NEW
Font size
WorksheetsProgramming - What Do I Know?
Total questions: 15
Worksheet time: 15mins
What is a variable for?
Holding information
Checking a condition
Adding some text
Changing the code
What is syntax?
The text editor we use to write code
The rules we follow when we write code so the computer can understand it.
The way we type so we can get the code written quickly.
How long the computer thinks before it can write a new line of code.
How would I finish this line of code to accept input from a user?
myAge = .......
input("What is your age?")
13
input(int("What is your age?"))
int(input("What is your age?"))
Why do we comment code?
To look good
To tell other people what our code means in plain English
To help the computer understand what we want the code to do.
The computer reads it and can help fill in information.
What is the missing word in this code?
input
int
"Your name"
What does the symbol ">=" mean in an if statement?
Less than or equal to
Less than
Greater than
Greater than or equal to
What would the above code print?
Your first name is not John but it is Smith
Your first name is not, Smith, but it is, John
Your first name is not lastName but it is name
Your first name is not Smith but it is John
What would the above code print out?
You are a giant!
You are a normal height
Oh no, are you shrinking?
Nothing
A diagrammatic representation of an algorithm is called a...
code chart
code diagram
flowchart
algorithm chart
Which line of code has an error that would stop it from running
1
3
5
6
True or false:
!= is a valid operator in an if statement.
True
False
What would the code print out?
5
3 + 2
32
Error
What range of numbers would the code print out?
20-30
20-31
20-29
0-30
What would the code above print out?
Sedan
4x4
Hatch
Sports
What could the for loop print out?
You can afford Halogen
You can afford LED
You can afford Fancy
You can afford Halogen, LED, Fancy
You can afford Halogen
You can afford LED
None of the above.
