Python Basics: revision quiz and key terms
Free practice for Python Basics in KS3 Computing (Years 7–9). It covers: python basics: print, input, variables, data types, casting, operators, if/elif/else, loops, comments and errors. Try the questions, then check the key terms.
Try 5 free questions
Sam writes age = input("Age? ") and wants to add 1 to the number typed. Which code does this correctly?
Python ignores comments when it runs a program.
How many times does the loop for i in range(5) run?
In Python, 7 / 2 gives 3.
Leo forgets the colon at the end of an if line. What type of error is this?
In RADevo, this topic has fill-in-the-blank, matching, multiple-choice and true or false activities, and every question you get wrong comes back in Revise today until you've learnt it.
Key terms for Python Basics
- Boolean
- A data type that can only hold True or False.
- Indentation
- Spaces at the start of a line that show which code belongs inside an if or a loop.
- Integer division
- The // operator, which divides and drops any remainder, so 7 // 2 gives 3.
- Logic error
- A mistake that lets the program run but makes it give the wrong result.
- Modulus
- The operator, written %, that gives the remainder after dividing.
- print()
- Shows text or values on the screen.
- Selection
- Choosing which code to run using if, elif and else.
- while loop
- Repeats code for as long as a condition stays True.
Teaching KS3 Computing (Years 7–9)?
Set this topic as homework in two clicks, see who has done it and which questions your class got wrong, and start every lesson with a Do Now built from their mistakes.
Start a free 2-week trialRevising for this?
If your school uses RADevo, sign in to do the full quizzes and keep your progress. If it doesn't, show this page to your Computing teacher.
Log in to RADevo