/pyexercise

Exercise programming with Python

Primary LanguagePython

Let's do some exercise in Python!

Question 1

count_list = [10, 20, 30, 40, 50, 60, 70, 80, 90] Write a function in Python language to calculate the average of the numbers in the list above.

Question 2

Write a function to remove duplicate integers from a given integer array of given length. Return a new array with result, do not modify the existing array. Also return the length of the result array.

count_list = [10, 20, 10, 30, 30, 40, 20, 50, 90, 60, 80, 70, 80, 90]

Question 3

Write a class/function to return True if 2 input strings are anagram to each other. string1 is an anagram of string2 if string2 can be obtained by rearranging the characters in string1. Example: string1 = ‘smart’, string2 = ‘marts’ => result = True string1 = ‘secure’, string2 = ‘rescue’ => result = True

Question 4

Write a program in Python, which: a. Finds and fetches all images on a webpage and stores the images on disk b. Writes a file on disk, which lists the URLs of the images fetched

How you can contribute?

Fork this repository. If you have any better solution, do 'pull request'.