Font size
WorksheetsPython Module 1
Total questions: 13
Worksheet time: 3mins
How do you create a variable with the numeric value 5?
x = 5
Both the answers are correct
x = int(5)
None
Is python compiled language ?
Yes
No
No Idea
What will be the output of :
a = 4.5
b = 2
print( a//b )
2.0
2.5
2.25
Error
What will be the output of above program
OLDDY
NEWDY
Error
None
What will be the output of above program
40
42
38
36
Which of the following are true of Python dictionaries:
Dictionaries are accessed by key.
Dictionaries can be nested to any depth.
All the keys in a dictionary must be of the same type.
A dictionary can contain any object type except another dictionary.
What command is used to insert 6 in a list "L" at 3rd position?
L.insert(3,6)
L.add(3,6)
L.insert(2,6)
L.append(2,6)
list = 5*[0]+5*[10]
What is the output of this?
Error
[0,0,0,0,0,10,10,10,10,10]
[50]
[5,50]
What is the output of the following program :
print "Hello World"[::-1]
dlroW olleH
Hello Worl
d
Error
What is the output of the following program :
print(0.1 + 0.2 == 0.3)
True
False
Machine Dependent
Error
Which of the following is false statement in python
int(144)==144
int('144')==144
int(144.0)==144
None of the above
What is output for −
' ' in 'python' ?
'python'
False
' '
True
Indentation Error
Cannot perform mathematical operation on strings
hello2
hello2hello2
