Starter quiz
- A program is a set of __________ that can be run by a computer.
- commands ✓
- directions
- points
- facts
-
- An ______ is a sequence of steps that can be followed to do a task.
- 'algorithm' ✓
- In this Scratch program, what is Hello World?
- an output ✓
- an input
- a variable
-
- In this Scratch program, what is the name of one of the variables?
- 'number' ✓
- A sequence is a precise set of instructions in a particular ...
- 'order' ✓
- What would be the output for the following algorithm: ```Repeat 3 times: Draw ✳✳✳♡ Draw ♡✳```
- ✳✳✳♡✳✳✳♡✳✳✳♡♡✳
- ✳✳✳♡♡✳✳✳✳♡♡✳✳✳✳♡♡✳ ✓
- ✳✳✳♡♡✳♡✳♡✳
- ✳✳✳♡✳✳✳♡✳✳✳♡♡✳♡✳♡✳
-
Exit quiz
- In programming, what is the term for the rules that specify the way that a program must be written?
- algorithm
- syntax ✓
- flowchart
- command
-
- What type of error does the Python code `pint("Success")` have?
- runtime error
- syntax error ✓
- logic error
- compilation error
-
- The Python code `Print("Hello World!")` has a syntax error. Rewrite the code correctly so that it doesn't have any syntax errors.
- 'print("Hello World!")' ✓
- Which function is used to display text or other information on the screen in Python?
- `input()`
- `output()`
- `print()` ✓
- `show()`
-
- What is the output of the following Python code? ```print("What is your name?") name = input() print(f"Hello {name}")```
- "What is your name? Hello"
- "What is your name?" followed by "Hello" and the users input ✓
- "What is your name?" followed by "Hello name"
- "Hello" followed by the user's input
-
Worksheet
Loading worksheet ...
Presentation
Loading presentation ...
Video
Lesson Details
Key learning points
- An algorithm is a sequence of steps that can be followed to do a task.
- A program is a set of commands that can be run by a computer in order for it to do a task.
- All programming languages have rules for syntax that must be followed so that the program can run.
- The print() function is used to output information from a Python program.
- The input() function is used to input data from the user into a Python program.
Common misconception
Pupils will modify their code to provide input directly in to the input() function, for example, user = input("Aisha"), rather than typing when asked as the program runs.
The computer follows the instructions of a program. Input that a user has to type in should only be entered when the program runs. This allows different users to provide different inputs without changing the program in any way.
Keywords
Algorithm - A sequence of steps that can be followed to do a task.
Program - A set of commands that can be run by a computer in order for it to do a task.
Syntax - The precise way that a program must be written to be understood by a computer.
+