CS in Schools Year 8 Classroom
Welcome to the CS in Schools Year 8 coding classroom! Before you do any exercises, please sign up to repl.it.
Lesson 1
Welcome to the first lesson! This course assumes you’ve finished the CS in Schools Year 7 coding classroom.
In this lesson, you’ll learn about number variables and how to use them to do maths.
To get started, watch the video below. You can follow along with the slides if you like.
When you’re done, please sign up to repl.it and then return to this page. Write down your username and password somewhere safe!
Now, complete the following three coding exercises:
To finish the lesson, try out the glossary flashcards app. Fork
the code, and try adding your own question and answer!
Lesson 2
In this lesson, you’ll learn about how to convert strings into integers. This allows you to take numbers that users type in and use them to do maths.
To get started, watch the video below. Here are the slides.
If you’re not logged in to repl.it, you’ll need to do that now here. Then, you can complete the following four coding exercises:
To finish the lesson, in repl.it click on “My repls” and open your version of the glossary flashcard app. Add these new definitions:
int
: A numeric data type representing whole numberscasting
: Changing one data type to another
Lesson 3
In our introductory programme, you learnt about the if
statement. In this lesson, you’ll learn about how to make more complex decisions with the else
and elif
statements.
To get started, watch the video below. Here are the slides and here is the flowchart handout.
If you’re not logged in to repl.it, you’ll need to do that now here. Then, you can complete the following three coding exercises:
To finish the lesson, in repl.it click on My repls
and open your version of the glossary flashcard app. Add these new definitions:
else
: A statement that means only if everything above isFalse
, do the followingelif
: If the statement above isFalse
, check if this isTrue
Lesson 4
In our introductory programme, you learnt about how to add loops to code with the goto
statement. In this lesson, you’ll learn about how to write loops with the while
statement and about the boolean
variable type.
To get started, watch the video below. Here are the slides.
If you’re not logged in to repl.it, you’ll need to do that now here. Then, you can complete the following three coding exercises:
To finish the lesson, in repl.it click on My repls
and open your version of the glossary flashcard app. Add these new definitions:
infinite loop
: a loop in code that goes on foreverboolean
: a type of variable that can only beTrue
orFalse
while
loop: a type of loop in Python that reduces the chance of writing spaghetti code
Lesson 5
This lesson teaches you how generate random numbers and compare values.
To get started, watch the video below. Here are the slides.
If you’re not logged in to repl.it, you’ll need to do that now here. Then, you can complete the following three coding exercises:
Lesson 6
This lesson introduces string
functions like .isupper()
and .islower()
.
To get started, watch the video below. Here are the slides.
If you’re not logged in to repl.it, you’ll need to do that now here. Then, you can complete the following three coding exercises:
Lesson 7
This lesson introduces the final assessment task, either a simple chatbot or a simple combat simulator.
To get started, watch the video below. You can follow along with the slides.
Your task is to choose one of the following examples to complete:
You should spend the whole lesson working on your assignment. You will have additional time in Lesson 8 to work on it as well.
Lesson 8
This lesson continues on with the final assessment task, as well as saying goodbye to your industry volunteer. You can follow along with the slides.
Log back into repl.it if you need to, and then take a look at the assignment specification. You can access your assignment code from your My Repls page.
You should finish and submit your assignment during this lesson. Thank you for your hard work and well done for completing the course!