Lesson details

Key learning points

  1. In this lesson, we will find out about variables. We will learn about the purpose of variables, but also the technical aspects of creating variables to a uniform standard. Variable declaration is not used in Python, so a wider look at this through other programming languages will help us gain an insight into its meaning.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
What does IDE stand for?
Integrated design environment
Integrated designers environment
Integrated developers environment
Correct answer: Integrated development environment
Q2.
Which one of these lines of code is a subroutine call?
"Twinkle, twinkle little star"
def menu()
Correct answer: menu()
score = 0
Q3.
Which of these is NOT an advantage of using an IDE?
Correct answer: Logic error checking
Syntax colour coding
Syntax error checking
Syntax highlighting

3 Questions

Q1.
Which of these variable names would be most suitable to hold data on a person's surname in Python?
lastName
Correct answer: surname
Surname
x
Q2.
Which naming convention is used for a constant in Python?
All lower case (e.g. myconstant)
All lower case with words separated by an underscore (e.g. my_constant)
All upper case (e.g. MYCONSTANT)
Correct answer: All upper case with words separated by an underscore (e.g. MY_CONSTANT)
Q3.
F strings allow you to display variables within print statements. Which TWO symbols are needed for an f string to work?
Correct answer: {}
*
Correct answer: f
s