Dr.
H N National College of Engineering
Jayanagar VI Block, Bangalore - 560070
PYTHON PROGRAMMING
I SEMESTER – (2025 BATCH)
QUESTION BANK
MODULE - 1
MODULE – I
1. Define the term program and explain high and low level languages
2. List and explain the essential components of a program and explain each
of them in a single program. (Hint: Take any example of a program and
explain the components of a program).
3. With examples explain the following types of errors
a. Syntax error
b. Run time error
c. Siemantic error.
4. List the different data types available and explain each one of them with
an example.
5. With one example program explain both the concept as listed below:
a. Variable and assignment operator
b. Overwriting on the variable.
6. With suitable examples explain the rules for writing the variable names.
7. Citing examples explain the concept of statically typed and dynamically
types programming languages.
8. Explain the concept of type conversion in Python. Differentiate
between implicit and explicit conversion with examples.
9. Develop a Python program with a while loop to display the Fibonacci
sequence up to n terms entered by the user.
10. Describe the Collatz 3n + 1 sequence and explain how iteration and
conditional statements are used in its implementation.
11. Explain the different data types supported in Python with syntax
and explain with examples.
12. Develop a python program to find the factorial of a number.
13. Explain the difference between = and == operator.
14. Explain flow control statements using if else and elif.
15. Develop a python program to read the name and year of birth of a
person and to display whether the person is a senior citizen or not.
16. Explain the following with an example
a. print() b. len() c. input()
17. For the following expression explain the order of operation and write the
final output
x= (((5+2)*(6-4))/2)
18. Explain string replication and string concatenation with suitable examples.
19. Receiving the input from the keyboard, write a program to check if the
input number is odd or even.
20. Write a python program to write the multiplication table of 5.
21. Write a python program to receive the input from the keyboard for three
subjects, Physics, Chemistry and Mathematics. For a passing marks of 50
check if the student has passed in all three subjects and display “Result
passed” else “Better luck next time”.
22. Receiving the input from the keyboard, write a program to check if the
input number is positive or negative.