Page 137 - TP_Plus_v4_Class6
P. 137
Choose the correct option.
1. What will be the output of the following expression?
22 % 3
a. 7 b. 1
c. 0 d. 5
2. The statement using AND operator results true if .
a. both expressions are true b. both expressions are false
c. either of the expressions is true d. None of these
3. Which one of the following has the highest precedence in a logical expression?
a. Addition b. Multiplication
c. Exponential d. Parentheses
4. Which of the following is true?
a. Comments are for programmers for better understanding of the program.
b. Python Interpreter ignores comments.
c. You can write multi-line comments in Python using triple quotes, either ‘’’ or “””.
d. All of these
5. Which of the following symbol(s) is/are used for comments in Python?
a. // b. ‘’
c. /**/ d. #
Tick ( ) the correct statements and cross ( ) the wrong ones.
1. The print() function allows to display output on the screen while a program executes.
2. Assignment operators are used to perform arithmetic operations between two operands.
3. The relational operators are used primarily in the expression evaluation to make a decision.
4. A variable can hold different types of values.
5. Comments are the most helpful part of any program.
Q Answer the following questions:
A
1. What is the use of variables in Python?
2. Define the term data types.
#Python 135

