IT tools assignment
IT tools assignment
7. You need to empty out the rectangular swimming pool which is 12 meters long, 7 meters
wide and 2 meter depth. You have a pump which can move l7 cubic meters of water in an
hour. Write a program to find how long it will take to empty your pool? (Volume =| * w * h,
and flowvolume/time).
8. Write a program to convert temperature from centigrade (read it as float value) to
Fahrenheit.
9. A car starts from a stoplight and is traveling with a velocity of 10 m/sec east in 20 seconds.
Write a program to find the acceleration of the car. [acc = (Vfinal-Vinitial)/Time].
11. Write a Program to Prompt for a Score between 0.0 and 1.0. If the Score Is Out of Range,
Print an Error. Ifthe Score Is between 0.0 and 1.0, Print a Grade Using the Following Table i
Score Grade
= 0.9
0.8 B
= 0.7
= 0.6
o.6
12. Write a Program to find the maximum of three numbers.
3.
Suppose you want
develop program to play
to a
generates
rules:
two-digit
a
number, prompts the user to enter
a lotery. "The program
randomiy
a two wins according to the 1ollownE
Ifthe user's input matches the
Ifall the digits in the user's lottery in the exact order, the award is $10,000.
$3,000. input match all the digits in the
lottery number, tnc
aa
If one
digit in the user's
input matches a digit
14. Write a in the lottery number, the award is
Program
15. Program to Find
to Check Ifa Given
Year Is a Leap Year. S1,0
the GCD ofTwo Positive
16. Write a Numbers.
program that prompts the user to enter a four
17. Write order.
Python Program to Find the Sum of Digits in a reverse
18. Write a Number
program to print the sum of the following
series.
1+1/2+1/3+... + 1/n
1/1+2/2+3'/3 +..... +n"/n
T9. Write a
Program to Display the Fibonacci Sequences up to nth Term Where n is Provided
by the User.
20. Write a
Program to Find the Sum of All Odd and Even Numbers
up to a Number
Specified by the User.
21. Write a Program to Check Whether a
Number Is Prime or
22. Writea Program to Find the Factorial
of a Number.
23. Write a Program to Demonstrate the Return of
Multiple Values from a Function
Definition.
24. Program to Demonstrate the Use of Default Parameters
25. Write Program to Demonstrate the
Scope of Variables.
26. Program to Print the Characters Which Are Common in Two
Strings.
27. Write a program to check whether a given String is palindrome or not.
28. Write Python Program to Count the Number of Times an Item appears in the List.
29. Write a program to create a list of integer num
30. Write a program to create a lists of integer numbers and
perform the linear and binary
search.
31. Write a program to create a lists of cities names and perform the sort the cities name in
alphabetical order.
32. Find Mean, Variance and Standard Deviation of List Numbers
33. Write a Program to Find the Transpose of a Matrix.
34. Write a program to perform the matrices multiplication.
35. Write a program to create a dictionary for countries name as key and currency as value.
Traverse the dictionary with key: value Pairs in using for Loop.
36. Write a program to create tuples, and perform the following operations: Merging of
tuples, Splitting of a tuple, comparison of two tuples.
37. Write a program to create an intersection, union, set difference, and symmetric difference
of sets.
38. Write a program with "MyRectangle" class having the dimensions as data members and
area) as a method member. Calculate the area of each rectangle object created by user.
39. Designa class with name "MyComplex" to represent the complex numberincluding the
constructor overloading, methods to perform the arithmetic operation over the two complex
numbers. Write the complete python program for the above design.
40. Designa class with name "Distance" to represent the distance in feet and inch. Include
the method to calculate the addition of two distances. Write the complete python program for
the above design.
4.Write a complcte program to implement the limployee and its subclasses (Salarayeca
Employee, Daily Waged Employee, Commission bascd employee) given in Hierarchical and
multilevel manner. The
program should exhibit the use of super key word to invoke the super
class constructor.
42. Write a program to open a file and perform the reading and writing operation with the
file.
43. Write a
program to count the number of line in a file.
44. Write a
program to count the frequencies of each word from a file.
45. Write a
program to copy the text of a file to another file.
46. Write a
program to append a file with the content of another file.
47. Write a
program to compare two file.
48. Write a program to delete and insert a sentence at specified position in a file.
9Write a program to delete a sentence from a file if the file contuins a specific word.
50. Write program to delete comment lines from a file.
51. Write a program to capitalize cach word of the file.
2 . Write a program to handle an exception using exception handling mechanism of the
python.
53. Write a program to raise an exception explicitly using raise keyword.