Skill Check
Python Skill Check
12 questions across every topic of the Python track. You get your level, a score for each topic and what to learn next.
12 questions
About 10 minutes
Level + score per topic
Every answer explained
Start the Skill Check
Sign in to save your result to your Skill Passport — or take it now and sign up afterwards.
Question 1 of 12
0:00
Getting Started What does this print?
a = input() # user types 10
b = input() # user types 20
print(a + b)
A 30
B 1020
C Error
D 10 20
Getting Started What is the output of print(7 // 2, 7 % 2)?
A 3.5 1
B 3 1
C 3 0
D 4 1
Getting Started Which is true about Python strings?
A They are mutable
B They are immutable
C They can only use double quotes
D They cannot be indexed
Getting Started What does "Python"[-1] return?
A "P"
B "n"
C An error
D "o"
Logic & Functions What does range(10, 0, -3) produce?
A 10, 7, 4, 1
B 10, 7, 4, 1, -2
C 10, 7, 4
D 0, 3, 6, 9
Logic & Functions When does the else block of a for loop run?
A Always
B Only if the loop ends without break
C Only if break was used
D Never — it is invalid syntax
Logic & Functions What is printed?
def f(x):
print(x * 2)
y = f(4)
print(y)
A 8 then 8
B 8 then None
C None then 8
D Error
Logic & Functions Why is def add(item, items=[]) risky?
A Lists cannot be parameters
B The same default list is shared across calls
C It is slower
D It causes a SyntaxError
Working with Data Which safely returns "NA" when the key "phone" is missing from dict d?
A d["phone"]
B d.get("phone", "NA")
C d.phone
D d.find("phone")
Working with Data What does [n * n for n in range(4) if n % 2 == 0] produce?
A [0, 4]
B [0, 1, 4, 9]
C [4, 16]
D [1, 9]
Working with Data Which statement about with open(...) as f is true?
A You must call f.close() yourself
B The file is closed automatically when the block ends
C It only works for CSV files
D It reads the whole file automatically
Working with Data Which exception does int("abc") raise?
A TypeError
B ValueError
C KeyError
D NameError
Back
Tip: press 1–4 to choose, Enter for next
Next