Introduction
is
Guess my number
music
Haunted House
functions
Draw it!
Calculator
Calculator 2
Piggy Bank
Quizmaster
debugging
Quiz

With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher). You can see this code is extremely inefficient, due to the very long code in line 5. All the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!

first_grade = ask 'What score did you get on your first test?'
second_grade = ask 'What score did you get on your second test?'
added = first_grade + second_grade
mean_grade = added / 2
if mean_grade = 1 or mean_grade = 2 or mean_grade = 3 or mean_grade = 4 or mean_grade = 5
    print 'Oh no! You have failed the subject...'
else
    print 'Great! You have passed the subject!'
Latest update: 2025 Apr 07(25376c)