Inputs, process, outputs
Before writing an algorithm ask: what goes in? What must happen? What comes out?
Topic 11 Algorithms
KS3 Computing · An algorithm is a precise, step-by-step plan to solve a problem. Computational thinking turns a messy problem into one. Every algorithm is built from just three things: sequence, selection and iteration.
Topic 13 Programming basics
KS3 Computing · A program stores information in variables, works on it with operators, and controls the order with sequence, selection and iteration. Examples are in Python, with Scratch alongside for Year 7.
ProgrammingCambridge Lower Secondary Computing 0860
Say each word, then read what it means. Every one is in the glossary too.
Read it here, or open the study page below to go one step at a time with things to try.
Before writing an algorithm ask: what goes in? What must happen? What comes out?
name = input("What is your name? ")
age = int(input("How old are you? "))
print("Hi " + name + ", next year you'll be " + str(age + 1))input() always gives back a string, even if you type digits.int() turns "13" into 13 so you can do maths. This is casting.str() turns 14 back into text so it can join other text.Open the study page and go one step at a time.
One question at a time. The reason shows after each answer.