NEW
Font size
WorksheetsComputational Thinking in Python[Quiz 3]
Total questions: 15
Worksheet time: 6mins
l1 = [4,6,8,1]
l1.append(5)
print(l1)
4,5,6,8,1
1,5,6,8,4
4,6,8,1,5
4,8,1,6,5
What is the symbol of floor division in Python
**
/
\
//
What is the output
x = 4
y = 6
print(x == y)
True
Error
False
Invalid statement
Correct syntax for while loop is
while(x>1)
#statements
While(x>1)
#statements
while x>1:
#statements
while x>1
#statements
Which function do we use to add an element at a particular element in the list
insert()
append()
add_list()
list_append
Which statement brings the control out of the loop
pass
break
catch
try
What is the output of the following code
a = 4
b = 3
pro = a**b
print(pro)
12
64
32
128
To get an integer input from the user, which is the valid line of code to be used
x = input()
x = int()
x = int(input)
x = int(input())
Can the for loop we used to print the star-pattern program
True
False
list_1 = [1,2,3,5]
_______
print(list)
output: 1,2,3,4,5
Which line of code should we enter in the blank to get the mentioned output?
list_1.append(4)
list1.insert(3,4)
list_1.insert(3,4)
list1.append(4)
What is the output of the following code
for in in range(1,2):
print(i)
1,2
1
2
error
What command is used to go to the next line
\t
\b
\r
\n
What is wrong with the following code?
esports = ("Donkey Kong", "Galaga", "Pac Man")
esports[1] = "Centipede"
The item at index 1 does not exist
You cannot update an item in a tuple
The [1] notation after the variable name is not valid
Nothing; this will work fine
