1.
a) Write a Python program to calculate the weight of the steel bar and develop a flow chart for
the same.
b) Write a Python program to circulate the values of n variables
2. a) Write a Python program to print the below Pyramid
**
***
****
*****
b)Write a Python program to calculate Simple Interest, Compound Interest
3. a) Write a Python Program to get the 5 bank customer account details with balance and print
only the customer details whose balance is greater than or equal to 10000
b) Write a python program to define a module to find Fibonacci Numbers and import the module
to another program.
4. a) Write a Python program that prints out the decimal equivalents of 1/2, 1/3, 1/4, . . . ,Using for
loop
b)Write a Python Program to print the Following number Pattern
55555
4444
333
22
Page 1 of 4
1
5. a) Write a Python program to Remove the Duplicate Element in the Tuple
b) Write a Python script to print a dictionary where the keys are numbers between 1 and 15
and the values are square of keys
Sample Dictionary {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100, 11: 121,
12: 144, 13: 169, 14: 196, 15: 225}
6. a) Write a Python Program to Capitalize each word in a given String
b) Write a Python program to create a dictionary from a string and count the letters from the
string.
Sample string : ’ENGINEERING’
Expected output: {’E’: 3, ’N’: 3, ’G’: 2, ’I’: 2, ’R’: 1}
7. a) Write a Python Program to Calculate the Weight of the Motor Bike.
b) Write a Python Program to raise ZeroDivisionError if the User enters 0 as numerator or
Denominator value.
8. a) Write a Python program that accepts a comma separated sequence of words as input and
prints the unique words in sorted form.
b) Write a Python program to print the sum of first 100 odd numbers.
9. a) Write a python program to that accepts length of three sides of a triangle as inputs. The
program should indicate whether or not the triangle is a right angled triangle (use
Pythagorean theorem):
b) Write a Python Program to Print all Prime numbers less than 50.
10. a) Define a function fact and write a python Script to find the factorial of a number
b) Write a Python Program to implement the following Python tuple operation
Page 2 of 4
i) Create a Tuple
ii) Find the length of the Tuple
iii) find the maximum and minimum element in the tuple
11. a) Write a program to create a menu with the following options
1.ADDITITON OPERATION
2. SUBSTRACTION OPERATION
3. MULTIPICATION OPERATION
4. DIVISION OPERATION
Accepts users input and perform the operation accordingly.
b) Write a Python Program to Compute Electrical current in a three Phase Electrical Circuit
12. a) Write a Python Program to find the Third Largest number in a given list using Functions.
b) Write a Python program to implement the following python List operation
i) Inserting the element at the specified positions
ii)Remove the element in the List
iii) Delete the entire List
iv) Position of the particular Element in a Given List
13. a) Write a Python function to reverses a string if it’s length is a multiple of 3.
b) Write a Python Program to count the number of Words present in a text file.
14. a) Create three text file such as “source1.txt”,”source2.txt”, in read mode , “target.txt” in write
mode and write a Python Script to copy the content of “source1.txt”,”source2.txt”, and write
the content in “target.txt file”.
b) Write a Python code to get the voters age as input. If the user Enters a Valid age as input
Display the Result otherwise Raise the Exception.
Page 3 of 4
15. a) Create a dictionary and apply the following operations
1) Print the dictionary elements
2) Access the dictionary elements
4) Change values of the dictionary
5) Calculate the Length of the Dictionary
b) Write a Python program to display the current date and time. In the Following format. .:
2022-06-06 15:35:15.
16. a) Write a Python program to append text to a file and display the text in the output screen.
b) Write a Python program which accepts the user’s first and last name and print them in
reverse order with a space between them.
17. a) Develop a car race game using Pygame.
b) Write a Python Script to calculate area of a circle.
18. a) Write a NumPy program to test whether any of the elements of a given array is non-zero.
b) Write a Python program to find the longest words in a file.
19. a) Write the Python program To compute sin(x) using the below given Formula
sin x = x - x3/3! + x5/5! - x7/7! + x9/9! ........
b) Write a Python program to Exchange the Values of two Variables.
20. a) Simulate Bouncing Ball Using Pygame.
b) Write a Python Script to Check whether a given Number is odd or Even.
Page 4 of 4