0% found this document useful (0 votes)
2 views

overall questions python programming-update

The document outlines the end semester practical examinations for the B.E Mechanical Engineering program, specifically for the course 'Problem Solving Using Python'. It includes a comprehensive set of programming tasks that students are required to complete, covering various Python concepts such as variable manipulation, arithmetic operations, data structures, and graphical plotting. The tasks range from basic operations to more advanced topics like inheritance and data analysis using libraries like NumPy and Matplotlib.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

overall questions python programming-update

The document outlines the end semester practical examinations for the B.E Mechanical Engineering program, specifically for the course 'Problem Solving Using Python'. It includes a comprehensive set of programming tasks that students are required to complete, covering various Python concepts such as variable manipulation, arithmetic operations, data structures, and graphical plotting. The tasks range from basic operations to more advanced topics like inheritance and data analysis using libraries like NumPy and Matplotlib.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Department of

Science and Humanities

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

1. Write a python program to swap two variable numbers.


Sample Input
a:23
b:56
Sample Output
a:56
b:23

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.

4. Print Number Pyramid Patterns Program in Python.

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.

9.Write a python program to perform arithmetic operations 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.

12.Write a python program to find the elements of the tuple.

13. Write a python program to find the size of a List.

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.

16. Write a python program to find fibonacci series of given numbers.

17. Write a python program to Check whether the give number is Prime number or not.

Sample Input Output


Enter a Number =5
It is prime number
Enter a Number =6
It is not prime number

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.

22. Write a python program to implement single inheritance in python inheritance.

23. Write a python program to implement multiple inheritance in python inheritance.

24. Write a python program to implement multilevel inheritance in python inheritance.

25. Write a python program to implement hierarchical inheritance in python inheritance.

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.

31. Write a python program by using Matplotlib to create a bar char.

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.

40. Write a Program to print full pyramid using *.


*
**
***
****
*****

You might also like