Review of Python Basics — Chapter Test

Answer all 5 questions, then submit. You need 60% to pass. Log in to save progress.

Question 1
Which of these is immutable?
Alist
Bdictionary
Ctuple
Dset
Question 2
What defines a block of code in Python?
ABraces { }
BIndentation
CSemicolons
DThe word 'block'
Question 3
Which dictionary method returns key-value pairs for looping?
Akeys()
Bvalues()
Citems()
Dpairs()
Question 4
What does range(1, 4) produce in a for loop?
A1, 2, 3, 4
B1, 2, 3
C0, 1, 2, 3
D1 to 4 inclusive
Question 5
Which list method removes and returns the last item?
Aappend()
Bpop()
Cremove()
Dsort()