Introduction
random
Haunted House
Sing a song!
Sing a song! 2
music
Language
Tic-Tac-Toe
Tic-Tac-Toe 2
Tic-Tac-Toe 3
Simon Says
Simon Says 2
Simon Says 3
debugging
Quiz

In this level we will grow a bit more towards real Python code. You will also learn how to match two lists together. This way you can program a code in which the correct animal is matched to the right sound. Because the two codes below... Are obviously nonsense!

animals = 'chicken', 'horse', 'cow'
sounds = 'cluck', 'neigh', 'moo'
for animal in animals
    print 'A ' animal ' says ' sounds at random

You could also try to make it work this way, but....

animals = 'chicken', 'horse', 'cow'
sounds = 'cluck', 'neigh', 'moo'
for animal in animals
    for sound in sounds
        print 'A ' animal ' says ' sound

Note: These codes will not work like this in this level. Head to the next tab to see which parts you need to correct.

Latest update: 2024 Jun 27(063d19)