Page 91 - TP_Modular_V2.1_Class6
P. 91
Interactive Mode is a command line shell which gives immediate result for each command.
The input() function takes the user’s input while a program executes.
The print() function prints or sends the output to the standard output device.
Variables are memory reference points where we store values which can be accessed or
changed later.
A data type specifies the type of value a variable can contain.
Comments enable us to understand the way a program works.
Operators can be defined as special symbols which perform arithmetic and logical computation.
Exercise
A. Tick ( ) the correct option.
1. What will be the output of the following expression?
22 % 3
a. 7 b. 1
c. 0 d. 9
2. The statement using AND operator results true if ........................... .
a. Both operands are true b. Both operands are false
c. Either of the operands is true d. One operand is true otherwise is false
3. Which one of the following has the highest precedence in a logical expression?
a. Multiplication b. Exponential
c. Parentheses d. Addition
4. Which of the following is true?
a. Comments are for programmers for better understanding of the program.
b. Python Interpreter ignores comments.
c. Both (a) & (b)
d. None of these
5. Which of the following symbol(s) is/are used for comments in Python?
a. ‘’ b. /**/
c. # d. ?
Introduction to Programming 89

