Cse107 Mid
Cse107 Mid
Question 1: (2.5)
Take an hour from the user as input and tell it is time for which meal.
• The user will input the number in a 24-hour format. So, 14 means 2 pm, 3 means 3 am, 18
means 6 pm, etc.
• Valid inputs are 0 to 23. Inputs less than 0 or more than 23 are invalid in 24-hour clock.
• Assume, Input will be whole numbers. For example, 3.5 will NOT be given as input.
Question 3
Write a Python code to displays all the odd numbers between 10 and 50. (2.5)
Question 4:
Write Python code of a program that reads an integer, and prints the integer if it is a multiple
of either 2 or 5. (2.5)
==================================================================
1. Plagiarism Policy: Plagiarism will not be tolerated. Any student caught plagiarizing will
receive a zero for the assignment and may face further academic consequences.
2. Format: Soft copies will not be accepted. All assignments must be submitted in hard
copy.
3. Deadline: Late submissions will incur penalties unless a valid reason is provided
beforehand.