Python Post Experiment Questions
Python Post Experiment Questions
Expt 1.
1.Compare how input/output operations differ in Python and C.
2. Write the equivalent C program for this Python code.
Expt 2.
1. How does Python handle mathematical operations differently from C?
2. What are the required inputs for each shape?
Expt 3.
1. How would the result of 10 / 3 differ from 10 // 3?
2. How does Python’s modulus operation differ from C when negative numbers are
involved?
Expt 4.
1. Why would you use a list for storing tasks instead of a tuple?
2. How can you sort a list of tasks based on priority (e.g., "High" > "Medium" >
"Low") using Python?
Expt 5.
1. How can you update an existing student's grade or attendance?
2. How would you modify the program to display all students who have the highest
grade in case of a tie
Expt 6.
1. What happens if the user enters a non-numeric value (e.g., "hello") instead of a
number?
2. How can the user exit the infinite loop safely?
Expt 7.
1. Discuss how separating arithmetic operations into different functions makes
debugging and maintenance easier.
2. Describe common errors that may occur in a calculator program (e.g., division by
zero, invalid input).
Expt 8.
1. Explain how exceptions like FileNotFoundError and IOError can occur while
handling files.
2. Compare regex-based filtering with traditional string methods like split() and
replace().
Expt.9
1. What are the advantages and limitations of using pyinstaller for creating
executable files?
PYTHON PROGRAMMING- 2024-25
Post Experiment questions
Expt 10
1. Why is exception handling important in division operations, and how does it
improve program reliability?
2. What are the different types of exceptions that can occur when performing division
in Python, and how can they be handled effectively?