A Text adventure Part 2
You are going to screenshot all of your work into a Powerpoint file.
To save your powerpoint go to:
Save the Powerpoint file: as your name
In computer science, a loop is a programming structure that repeats a sequence of instructions until a conditional statement is False. We are going to look at the While loop.
But first...
Click on the link above to open up edublocks
See if you can make the code using the blocks below
Now copy it into into either IDLE or Thonny by clicking on the Blocks button in the top right hand corner of the page.
The code should look like this:
A for loop is either used for repeating itself a specific number of times, we use the range() fuunction for this or for iterating through a sequence (that is either a list, a tuple, a dictionary, a set, or a string).
Save your file as 'for_loops'
Add in this comment at the top of your page
Add in this comment at the top of your code #A while loop allows us to repeat our code
Save your file as 'while_loops'
Let's try doing a while loop in Edublocks
Save your file as 'while_loops2'
Last lesson we created a simple question and some different outputs using an if statement
We are now going to ask a question using a while loop
Tick each task when you have successfully done it in the following list:
Don't forget to add #comments
Lets look at the learning outcomes and decide which one best describes our current level of understanding :
Tick the one you feel is closest to your level