Font size
Worksheetspython concepts class 11
Total questions: 60
Worksheet time: 32mins
Is Python a high level programming language ?
TRUE
FALSE
Who is the creator of Python programming language ?
Dennis Ritchie
James Gosling
Guido van Rossum
Ross Ihaka
Complete the program to find greater of two numbers ?
Which Program will generate odd numbers ?
What will be the answer of print(5+10) ?
510
15
51
50
What will be the answer of print("50" + "50")
100
5050
505
2500
What is a correct syntax to output "Hello World" in Python?
echo "Hello World"
echo("Hello World")
p("Hello World")
print("hello World")
How to you insert comment in Python ?
Using "#"
Using "//"
Using "--"
Using "\\"
What is the correct file extension for Python files?
.pyth
.pyt
.py
.pt
What is the output of print(100/0 ) ?
100
0
1
Division Error
Which one does take you to next line?
\t
\n
/n
\\
What is the word (command) used to display numbers and text on the screen?
Input
Output
Command
What symbol is used in python to assign values to a variable?
:
*
=
==
Which of these would work as a piece of code?
if string="Dove"
if string=="Dove"
IF string="Dove":
if string=="Dove":
What is the end after if statements?
if
Elif
Else
While
Which of the following is a correctly-formatted comment?
*Comment
"Comment"
#comment
(comment)
A line of text that Python won't try to run as code
Integer
Comment
Strings
Input
A data type than can have one of two values: True or False
Boolean
Basic Calculation
For
While
Data type for a whole number
Float
Boolean
Integer
String
A Python data type that holds positive and negative whole numbers
String
int
str
input
The Boolean operator that returns true if EITHER of its operands are true
and
or
not
equal
// means:
two times division
integer division
exact division with floating number
Put a slash
What does symbol % do?
Integer exact division
Percentage
Division
Remainder
What does "\t " make?
Goes to next line
Horizontal space between two strings
Give a title
Add a slash
What is the answer to this expression, 22%3 is
7
1
0
5
Which is the correct operator for power xy
x^y
x**y
x^^y
None of these
Which one of theses is floor division
/
//
%
None of theses
What is the order of precedence in Python?
i. Parenthesis
ii. Exponential
iii. Multiplication
iv. Division
v. Addition
vi. Subtraction
i, ii, iii, iv, v, vi
ii, i, iii, iv, v, vi
ii, i, iv, iii, v, vi
i, ii, iii, vi, v, iv
Mathematical operations can be performed on a string
True
False
Operators with same precedence are evaluated in which manner?
Left to Right
Right to Left
Can't Say
None of the mentioned
What is the output of this expression, 3*1**3
27
9
3
1
Which of the following is an invalid variable?
my_string_1
1st_string
foo
-
is Python case sensitive when dealing with identifiers?
yes
no
machine dependent
none of these
print(3+4)
print("3+4")
It is possible to execute both the (block of) statements under if and the else clauses at the same time.
Yes
No
What would be outputted here?
Bigger than 2!
Number is 5
Bigger than 2!
Number is 5
Nothing
This operator checks to see if one value is the same as the other value
==
!=
>
<
What is the output of the following code?
Time = "Day"
Sleepy = False
Pajamas = "Off"
if Time == "Night" and Sleepy == True:
Pajamas = "On"
print(Pajamas)
off
on
False
Day
What will the be the output of the following code?
if (10<0) and (0 <-10):
print(“A”)
else:
print(“B”)
A
B
AB
BA
Is the following statement true or false?
More than one condition cannot be used with an IF statement.
True
False
The result of this program:
Friday = False
if Friday:
print "Jeans day!"
else:
print "Uniform day"
Jeans day
Today is Friday
Uniform day
Not Friday
What is the output?
condition
True
Program has a syntax error.
3 > 2
What do we use to define a block of code in Python language?
Key
Brackets
Indentation
None of these
