WorksheetsCoding and Python Revision
Total questions: 21
Worksheet time: 12mins
What term is used for whole numbers in programming?
integer
string
boolean
float
What term is used for words or characters in programming?
Float
Boolean
Integer
String
print(Hello world!)
Sonam has written this program in Python. One of the lines contains at least one error. Which line is it?
print(“Hello world!”)
name=input(‘please enter your name’)
print(happy to meet you)
print(‘you have great name’)
Which of the following is an integer?
8
4.5
How would you display the message "Hello world" on the screen?
print("Hello world")
print "Hello world"
print (Hello world)
What will the program print?
number = 10
print(number+10)
20
10
number+10
How would this run:
print ("Hello, World!")
Hello, World!
("Hello, World!")
"Hello, World!"
What is a variable?
A piece of code that stores information
a type of graphics
Data type
a type of memory
name = 'Dave'
print (name)
print(3+4)
What is the Python code needed to ask a user for input?
input("what is your name?")
input="what is your name?"
(input)=what is your name?
input=what is your name?
What is a computer program?
A set of instructions to the computer written in a programming language
A TV show about computers
A piece of software that you use to write code
A set of instructions written on a piece of paper
What is an algorithm?
A computer program
A programming language
A mistake in your code
A set of precise instructions used to solve a problem.
Why must a computer program be translated?
because computers only understand computer language
because computers only understand binary code (1's and 0's)
because computers only understand French
to make it harder for you to understand the code
