Which of the following is the definition of a variable?
A container which is used to store values such as the number of attempts a person tries to log on to a network.
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
A value that cannot be altered by the program during normal execution: the value stays the same.
Messages to explain to others, and often to remind yourself, what the code is intended to do.
2. Multiple Choice
1 minute
1 pt
Which of the following is the definition of a comment?
A container which is used to store values such as the number of attempts a person tries to log on to a network.
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
A value that cannot be altered by the program during normal execution: the value stays the same.
Messages to explain to others, and often to remind yourself, what the code is intended to do.
3. Multiple Choice
1 minute
1 pt
Which of the following is the definition of pseudocode?
A container which is used to store values such as the number of attempts a person tries to log on to a network.
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
A value that cannot be altered by the program during normal execution: the value stays the same.
Messages to explain to others, and often to remind yourself, what the code is intended to do.
4. Multiple Choice
1 minute
1 pt
Which of the following is the definition of a constant?
A container which is used to store values such as the number of attempts a person tries to log on to a network.
A language that is similar to a real programming language, but is easier for humans to understand although it doesn’t actually run on a computer. It can easily be converted to a regular programming language.
A value that cannot be altered by the program during normal execution: the value stays the same.
Messages to explain to others, and often to remind yourself, what the code is intended to do.
5. Multiple Choice
30 seconds
1 pt
An identifier is the ‘name’ given to a variable. For example: distanceToSchool = 10 Which part is the identifier?
10
=
distanceToSchool
6. Multiple Choice
45 seconds
1 pt
An identifier is the ‘name’ given to a variable. For example: distanceToSchool = 10 What is the value of the variable?
10
=
distanceToSchool
7. Multiple Choice
30 seconds
1 pt
Which of the following is not a considered a golden rule for choosing variable identifiers?
Shorter identifiers are easier to type and spell. A longer identifier could easily be misspelt.
Longer identifiers may be used if they are more descriptive of the data they represent.
Variable identifiers are normally written in capitals.
Some identifiers may be reserved words used by the programming language and cannot be used and in many programming languages identifiers cannot begin with a number.
8. Multiple Choice
30 seconds
1 pt
When variable identifiers are compound words snake case and camel case can be used. Which variable identifier below is using camel case?
yourName=input("What is your name? ")
yourname=input("What is your name? ")
YOURNAME=input("What is your name? ")
your_name=input("What is your name? ")
9. Multiple Choice
30 seconds
1 pt
When variable identifiers are compound words snake case and camel case can be used. Which variable identifier below is using snake case?
yourName=input("What is your name? ")
yourname=input("What is your name? ")
YOURNAME=input("What is your name? ")
your_name=input("What is your name? ")
10. Multiple Choice
30 seconds
1 pt
Which of the following assignment statements is assigning a number .
myAge = 21
myAge = "21"
11. Multiple Choice
45 seconds
1 pt
Which of the following assignment statements is assigning text.
myName = "David"
myAge = 21
12. Multiple Choice
30 seconds
1 pt
A constant is a value that cannot be altered by the program during normal execution: the value stays the same.
True
False
13. Multiple Choice
30 seconds
1 pt
A constant is normally written in lower case.
True
False
14. Multiple Choice
30 seconds
1 pt
Which is the correct way to get the user to enter a value when written as pseudocode?
input (“Please enter the length”)
length == input ("Please enter the length")
length = (“Please enter the length”)
length = input (“Please enter the length”)
15. Multiple Choice
30 seconds
1 pt
When writing pseudocode it is a good idea to add comments to explain to others, and often to remind yourself, what the code is intended to do. To separate these comments from the actual code, what character(s) are used?