Python Basics Quiz

10:00

Test core Python syntax, types and control flow. · 10 questions

Question 1 of 10
What is the output of `print(type([]))`?
Question 2 of 10
Which keyword defines a function?
Question 3 of 10
What does this print?
x = [1, 2, 3]
print(x[-1])
Question 4 of 10
Which type is immutable?
Question 5 of 10
What is `3 // 2`?
Question 6 of 10
What does `len({'a': 1, 'b': 2})` return?
Question 7 of 10
Output of the code?
s = 'BeeProton'
print(s[3:6])
Question 8 of 10
How do you handle an exception?
Question 9 of 10
What does this print?
a = [[1, 2], [3, 4]]
b = a.copy()
b[0].append(99)
print(a[0])
Question 10 of 10
What is printed?
fs = [lambda: i for i in range(3)]
print(fs[0]())