NEW
Font size
WorksheetsPython
Total questions: 15
Worksheet time: 8mins
What will be the output?
name = "Mr Grierson"
print (name)
Mr Grierson
'Mr Grierson'
name
(name)
Which of these is the odd one out?
INPUT
INT
IF
What is a variable?
A Function
An integer
A name we give to a value
A property of the program we use
What Brackets do we use with a function?
<>
()
[]
{}
What is a data type than can have one of two values: True or False
boolean
variable
modulo
interpreter
What is the purpose of a test table?
To record the data we input
To use as a list of instructions
To check we are getting the expected output from a program
A type of truth table
What does the following operator mean?
!=
Equals to
Less or equal to
Not equal to
More or equal to
When dividing two integers in Python what data type would the output be?
Float
Integer
String
Boolean
You would store a mobile number as a Integer
True
False
Looking at the program how many times will it loop for before stopping?
7
5
6
8
holds whole numbers
holds a decimal point in a number
Which of these functions could convert a number to a string
str()
int()
parseInt()
convert()
I am 18 years old! What will the output be?:
IF you are 70 or older, say “You are aged to perfection!”
ELIF you are exactly 50, say “Wow, you are half a century old!”
ELSE say “You are a spring chicken!”
"You are aged to perfection"
"Wow, you are half a century old!"
"You are spring chicken!"
Who is the creator of Python Language
James Gosling
Guido van Rossum
Dennis Retchie
Bjarne Stroustrup
