Page 41 - Modular v1.1 Pyhton
P. 41
Periodic Assessment-1
(Based on chapters 1 to 3)
A. What will be the output of the following Python codes:
1. x = 2
y = 3
print ('Sum of',x,'and',y,'is',x+y)
2. days = int(input("Enter days: "))
months = days / 30
days = days % 30
print("Months = ",int(months),"Days
= ", days)
B. Write a program to print the even numbers between 1 and 25 by using the conditional
statement.
C. Write the use of the following operators.
1. Exponentiation (**) ………………………………………………………………………………………………………
2. Multiplication assignment (*=) ………………………………………………………………………………………
3. AND ……………………………………………………………………………………………………...........................…
4. Not equal (!=) ………………………………………………………………………………………………………..........
Periodic Assessment-1 39

