WorksheetsModule 1- Python Basics_2nd_Semester
Total questions: 10
Worksheet time: 5mins
Name
Class
Date
1.
1.Enter 2 + 2 at the prompt to have Python do some simple math. The editor window should now look like this:
a)
2+2
b)
(2+2)
c)
2+2;
d)
y=2+2;
2.
2. Result of this expression (5 - 1) * ((7 + 1) / (3 - 1))
a)
20
b)
16
c)
21
d)
31
3.
3. output of the Expression is a
a)
single Value
b)
Multi Value
c)
Complex Value
d)
cant be determine
4.
4.Python programs can also have text values called
a)
Variable
b)
Strings
c)
Expression
d)
statement
5.
5.The output of this statement 'Alice' * 5
a)
'AliceAliceAliceAliceAlice'
b)
AliceAliceAliceAliceAlice
c)
can't be performed
d)
125
6.
6.Variable Names should not
a)
only one word with no spaces
b)
use only letters, numbers, and the underscore (_) character
c)
begin with a number
d)
begin with a alphabet
7.
7. This symbol indicates comment
a)
#
b)
//
c)
\\
d)
"
8.
8.The output datatype of a len() Function is
a)
float
b)
int
c)
string
d)
all the above
9.
9.Th output of a
7+6*5-2
a)
33
b)
35
c)
16
d)
18
10.
10.Invalid Variable name
a)
_done
b)
a123var
c)
#abc
d)
Variable
100 %
