Assessment of Python
Assessment of Python
Assessment of Python
2. Type Conversions
• Write a program that asks for two user inputs, converts them
to integers, adds them, and displays the result.
4. Control Structures
• In Python, how do control structures like if-else and elif
improve the decision-making process in a program?
5. Loops
• Why would you choose a while loop over a for loop in Python?
Provide a situation where one is more appropriate than the other.
6. Functions
7. List Comprehensions
• How do list comprehensions improve the readability and
efficiency of code? Compare a traditional loop with a list comprehension.