- Learning use sequence, selection, and repetition in programming
- I understand how to iteration
- I know how to sequence of instructions
- I can use selection.
If a student got 73 mark from their test result of their maths exam. Using below code will you tell what grade they will get.
Also what will be the output for a student who got only 35 mark.
mark = input(“What mark did you get from your test?”)
if mark > “80” :
print(“Well done you got A*”)
elif mark > “70” :
print(“Well done you got A”)
elif mark > “55” :
print(“Well done you got B”)
elif mark >= “40” :
print(“Well done you got C”)
print(“You have to work hard!”)
Learning coding with Code Combat
Watch the video to help you with your task using code combat site to use various scripts to achieve your given goals.
Code Combat video
- Whilst you are coding with code combat you need to write in your books the commands you will be using
- and explain what does the each commands do
Once you will get to code combat website. This will be on your screen which you need to click big yellow arrow to follow on screen instructions to select your hero character. Make sure you have selected an equipment to your hero.
Then click play.
Once you have selected your hero you can start play and coding. To code you need to use right hand side of your screen then click RUN if your algorithm correct your hero will achieve its target.
Above picture what you will get once you click START LEVEL. This is your combat screen where you will write instructions to your hero to follow.
This part of the screen where you will write your commands as script for your hero to follow.
You need to follow on screen instructions. And you need to make sure to write the commands you have used in your books and explain what the each command does.
Click below image to get to Code Combat website
Using the code below document, you must include the correct method of input. You need to make sure that you use the correct data type for the situation. Remember to spot your syntax errors while you do it.
Download the home learning document if you have not got on paper.