WorksheetsPython programming
Total questions: 30
Worksheet time: 14mins
Which word completes this sentence: "Iteration makes code more ___________"
Complex
Efficient
Simple
Straightforward
A FOR loop is....
A COUNT controlled loop
A CONDITION controlled loop
A WHILE loop is....
A COUNT controlled loop
A CONDITION controlled loop
What is a program?
A series of a step-by-step instructions that tell a computer how to solve a task
A video that is watched on a computer
A flowchart written on a computer
The make and model of a computer
What is a programming language?
Written English
An artificial language used to program a computer
A language used in pseudocode
Machine code
What does the print command do?
Outputs a hard copy of a program to a printer
Outputs a message on screen
Print a hard copy of a flow chart to a printer
Prints out the the commands line by line on the screen
Which data type is the most suited to store a telephone number in a variable?
string
integer
float
boolean
Which data type would you use for the quantity of stock in a shop?
integer
float
string
boolean
If you want to change the data type to an integer which line of code would you use?
int ("How much pocket money do you have?")
input("How much pocket money do you have?")
int(input("How much pocket money do you have?"))
int = ("How much pocket money do you have?")
What is a statement?
A calculation performed in a programming language
A box in a flow chart
A keyword in a programming language
A printout of the program
How many statements are in this line of code?
print("If I do well in computing, I will find most subjects easy")
2 - print and if
0 - there are no statements
1 - print
What will be the output?
name = "Dave"
print (name)
Dave
name
"Dave"
(name)
What is a input?
To plug in something
A function that allows us to ask the user to enter some data
Data displayed on a screen
A routine
A variable must have been assigned (given) a value before that value is referenced (used).
True
False
To display the following on screen Hello World! the following command should be used:
print(Hello World!)
print("Hello World" + !)
print("Hello World!")
print"(Hello World!)"
You assign a value to a variable with which symbol
@
==
=
*
The code you use to receive and input from the keyboard
enter()
add()
receive()
input()
Program statements are executed in sequence, one after the other...
True
False
If the coding steps are in the incorrect order, the computer can still execute the program.
True
False
Python (TM) is owned and managed by
Microsoft (c)
Sun Microsystems (c)
Python (TM) is open source and free to use
Google (c)
Generally speaking, a low level programming language is easier to read, write and maintain over a high level programming language
True
False
A string
carries out an action
the elements of a command
a collection of characters
how elements in a commad are arranged
What symbol comes before a comment?
$
>>
#
!
An exception is
the structure of form of the code
the meaning of the characters and words in the code
the statement that is missing from the instructions
an event occurring during execution of a program which disrupts the flow of the program's instructions
Debugging is
how characters are arranged in a statement
detecting or removing errors from a program
removing viruses from a computer
the meaning of each of the characters and symbols in the program
What is a variable?
A box(memory location) where you store values
A box(memory location) where you store multiple values
Data type
A static memory value
Which of these tests whether the variable x is the same as 'Hello'?
x = "Hello"
x != "Hello"
x == "Hello"
x <> "Hello"
