Page 39 - 2501_KVS_C-8
P. 39
3. A=100
B=100//10
if A==B:
print(“Equal”)
else:
print(“Unequal”)
A. Equal C. Error
B. Unequal D. None
4. (10+3*4//2):
A. 26 C. 16.0
B. 16 D. None
5. if 15%2!=1:
print(“Even”)
else:
print(“Odd”)
A. Even C. Error
B. Odd D. None
E. State whether these statements are true or false.
1. ‘>’ is an arithmetical operator in python. _________
2. In the statement (3>5), 3 & 5 are operators while ‘>’ is an operand. _________
3. ‘float’ is a data type used to store decimal values. _________
4. ‘else’ is used to run some statements when the condition given in
‘if’ is ‘True’. _________
5. The expression “A”==”a” gives the output ‘True’. _________
Something to Do
1. Write a program in python to accept the length & breadth of a rectangle from the user
and print the area if it is a square otherwise print its perimeter.
2. Write a program in python to accept the number(N) of items and price(P) per item from
the user and calculate and display the total amount of all items.
3. Write a program in python to accept the marks of a student in 5 subjects and calculate and
display the Total Marks and Percentage(%age). Assume Max. Marks in each subject is 100.
4. Write a program in python to accept the value of X from the use and calculate and
display the value of the following equation: (X + 3X – 10).
2
5. Write a program in python to accept any two numbers A & B from the user. The program
will display the bigger number between them otherwise give a message that “Both are
equal”.
Recap of Python of Class VII 37

