chenshaobin / python_100

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ex1 # Write a program which will find all such numbers which are divisible by 7 but are not a multiple of 5, # between 2000 and 3200 (both included). # The numbers obtained should be printed in a comma-separated sequence on a single line. ex2 # Write a program which can compute the factorial of a given numbers. # The results should be printed in a comma-separated sequence on a single line.Suppose the following input is supplied to the program: 8 Then, the output should be:40320 ex3 # With a given integral number n, write a program to generate a dictionary that contains (i, i x i) # such that is an integral number between 1 and n (both included). # and then the program should print the dictionary ex4 # Write a program which accepts a sequence of comma-separated numbers from console and generate a list # and a tuple which contains every number.Suppose the following input is supplied to the program ex5 # Define a class which has at least two methods: # getString: to get a string from console input # printString: to print the string in upper case. # Also please include simple test function to test the class methods. ex6 # Write a program that calculates and prints the value according to the given formula: # Q = Square root of [(2 CD)/H] # D is the variable whose values should be input to your program in a comma-separated sequence. ex7 # Write a program which takes 2 digits, X,Y as input and generates a 2-dimensional array. # The element value in the i-th row and j-th column of the array should be i _ j. ex8 # Write a program that accepts a comma separated sequence of words as input # and prints the words in a comma-separated sequence after sorting them alphabetically. ex9 # Write a program that accepts sequence of lines as input # and prints the lines after making all characters in the sentence capitalized. ex10 # Write a program that accepts a sequence of whitespace separated words as input # and prints the words after removing all duplicate words and sorting them alphanumerically. ex11 # Write a program which accepts a sequence of comma separated 4 digit binary numbers as its input and # then check whether they are divisible by 5 or not. The numbers that are divisible by 5 are to be printed in a comma separated sequence.

About


Languages

Language:Python 100.0%