Page 98 - PlugGPT_V2.0_C7_Flipbook
P. 98
The result of the above program is:
Output
Enter the height of the cylinder: 5
Enter the radius of the cylinder: 2.5
The volume of the cylinder is: 98.21428571428571
Surface area is: 117.85714285714286
Restart
A computer language is the medium by which instructions are transmitted to the computer to
perform a specific task.
Python is a popular high-level programming language.
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 computations.
Checkpoint
A. Tick ( ) the correct option.
1. What will be the output of the following expression?
22 % 3
a. 7 b. 1
c. 0 d. 4
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. None of these
3. Which one of the following has the highest precedence in a logical expression?
a. Multiplication b. Exponential
c. Parentheses d. All of these
96 Premium Edition-VII

