Python Exercise12

September 28, 2017 0

Write a program to take input of integers from the user and divide the numbers handle TypeError and ZeroDivisionError in your program try: a=input(“Please enter Read More

Python Exercise11

September 27, 2017 0

Write a program to take input from command line and print all the values from sys import argv script,first, second =argv print (“The script is Read More

Python Exercise10

September 27, 2017 0

Write a program to find the random numbers from 1 to 100 and call the function for 500 times and print how many times each Read More

Python Exercise9

September 27, 2017 0

Write a program to stop the search as soon as we find 50 in the list numbers = [100, 25, 125, 50, 150, 75, 175] Read More

Python Exercise8

September 27, 2017 0

1. Write a program to write all multiple of 7 from 10 to 100 in to a file f=open(‘file1.txt’,’w’) for i in range(14,100,7):  f.write(str(i)+ ‘\n’) Read More

Python Exercise7

September 26, 2017 0

Write a program to read file contents at a time f = open(‘input.txt’,’r’) print(f.read()) f.close()   Write a program to read a file char by Read More

Python Exercise6

September 20, 2017 0

Write a function to read each char from the word if the char matches with the word find the index of that char,store it in indices Read More

Python Exercise5

September 18, 2017 0

Print values from 0 to 10. for i in range(11):     print(i) Print values from 10 to 0  for x in range(10,-1,-1):     print(x) Print Read More

Python Exercise4

September 18, 2017 0

1. Write a program to create list of squares of all odd numbers below 50 and print the list. a=[] for x in range(1,50,2):     Read More

1 2