Teaching Materials
What is new in this level?
This level focusses on working with lists. The students will also learn how to use repitition the Python way.
New in this level:
- Working with lists
- Combining lists with for if and random
- Repitition with for i range(1,10)
- Slides Present the level, one concept at a time
Common mistakes
Students forget the brackets
What students get wrong
From this level on lists should be in brackets.
icecream = 'strawberry', 'chocolate' print 'I love ' icecream[random] ' icecream'
How to fix it
This is the correct code:
icecream = ['strawberry', 'chocolate'] print 'I love ' icecream[random] ' icecream'
Students use the wrong brackets
What students get wrong
From this level on lists should be in brackets.
icecream = ('strawberry', 'chocolate')
print 'I love ' icecream[random] ' icecream'
How to fix it
This is the correct code:
icecream = ['strawberry', 'chocolate']
print ('I love ' icecream[random] ' icecream')
Students forget the quotation marks while focussing on the brackets
What students get wrong
Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks.
icecream = [strawberry, chocolate] print 'I love ' icecream[random] ' icecream'
How to fix it
This is the correct code:
icecream = ['strawberry', 'chocolate']
print('I love ' icecream[random] ' icecream')
Students still use the old at random command
What students get wrong
random has changed this level
icecream = [strawberry, chocolate] print 'I love ' icecream at random ' icecream'
How to fix it
This is the correct code:
icecream = ['strawberry', 'chocolate'] print 'I love ' icecream[random] ' icecream'