overall questions python programming-update
overall questions python programming-update
DATE:04/01/2025
END SEMESTER PRACTICAL EXAMINATIONS – DECEMBER 2024
PROGRAMME : B.E
BRANCH : Mechanical Engineering
COURSE CODE : 23ADR107/ Problem Solving Using Python
YEAR / SEMESTER: I/I
BATCH : 2024
DATE : 04.01.2025
QUESTION SET-A
2. Write a python program to find total, average and percentage of five subjects.
For Example,
Input
Enter marks of five subjects: 95 76 85 90 89
Output
Total = 435
Average = 87
Percentage = 87.00
3. Given two integers and write a python code to perform the following operations:
a) The first line contains the sum of the two numbers.
b) The second line contains the difference of the two numbers (first - second).
c) The third line contains the product of the two numbers.
1
22
333
4444
55555
5. Scientists have determined that the world’s ocean levels are currently rising at about 1.5
millimeters per year. Write a python program to display the following:
The number of millimeters that the oceans will rise in five years.
The number of millimeters that the oceans will rise in seven years.
The number of millimeters that the oceans will rise in ten years.
6. The date June 10, 1960, is special because when it is written in the following format, the
month times the day equals the year: 6/10/60. Write a python program that asks the user to enter a
month (in numeric form), a day, and a two-digit year. The program should then determine
whether the month times the day equals the year. If so, it should display a message saying the
date is magic. Otherwise, it should display a message saying the date is not magic.
7. A bug collector collects bugs every day for seven days. Write a python program that keeps a
total of the number of bugs collected during the seven days. The program should ask for the
number of bugs collected for each day (Sunday to Saturday), and when the data is collected for
all the days, the program should display the total number of bugs collected.
8.Write a python program to calculate area and perimeter of rectangle prompt by the user.
10. Write a python program to find Tuples with positive elements in List of tuples.
11. Write a python program to perform logical operators prompt by the user.
14. Write a python program to check whether the given number is odd or even prompt by the
user.
15. Write a python program to check whether a person eligible to vote or not prompt by the user.
17. Write a python program to Check whether the give number is Prime number or not.
18. Write a python program for Converting integer values in a list of tuples to float.
19. Create a python package named “temperature conversion” that contains two modules:
“Celsius_to_Fahrenheit” and “Fahrenheit_to_Celsius” Implement functions in each module that
can convert temperatures between Celsius and Fahrenheit.
20. Write a python program that prompts the user to enter a number within the range of 1 through
10. The program should display the Roman numeral version of that number. If the number is
outside the range of 1 through 10, the program should display an error message.
21. Create a class to represent a heat exchanger with properties like heat transfer coefficient,
surface area, and inlet temperatures. Implement a method to calculate the heat transferred in the
exchanger.
26. Perform basic file operations like Open, Read, Create and Append and also perform simple
data processing and analysis tasks in python
27. Write a python code to perform addition of matrices using NumPy in python.
28. Write a python code to perform Subtraction of matrices using NumPy in python.
29. Write a python code to perform multiplication and division of matrices using NumPy in
python.
30. Perform various types of operations analysis and charts using python libraries of matplotlib.
32. Write a python program by using Matplotlib to create a basic line plot.
33. Print the output of the following pattern in python:
*
**
***
****
*****
34. Write a factorial program prompt by user in python using function.
35. Write a python program to check whether the given number is an Armstrong number or not
by using a function.
36. Write a Python program to sum all the items in a dictionary.
37. Write a Python program to remove a key from a dictionary.
38. Write a Python program to create set difference.
39. Write a Python program to create a union of sets.