No student devices needed. Know more
16 questions
In Python the STRING data type ...?
holds letters and numbers, like text
holds whole numbers
holds numbers with a decimal point
holds a TRUE or FALSE value
In Python the INTEGER data type ...?
holds letters and numbers as text
holds whole numbers
holds numbers with a decimal point
holds either ‘true’ or ‘alse'
In Python the FLOAT data type...?
holds letters and numbers as text
holds whole numbers
holds a number with a decimal point
hold either TRUE or FALSE
In Python the BOOLEAN data type ...?
holds letters and numbers as text
holds whole numbers
holds a number with a decimal point
holds either TRUE or FALSE
Which is correct for a VARIABLE?
a value in a program which you can change, such as a score in a computer game.
a value that cannot be changed
What data type would be used for storing someone's telephone number?
Float (using a decimal point)
Integer (just whole numbers)
String (letters and numbers as text)
If we needed to store a POSTCODE in Python, what data type would we use?
String (letters and numbers as text)
Float (a number with a decimal point)
Boolean (true or false)
What is 'pseudo code?'
complex real code used in program design.
'fake code' used in program design.
What does this code do:
amount = int(input("Enter a number of pounds: "))
input amount as a whole number of pounds
input amount as pounds and pence with a decimal point
What is the code for a STRING in Python?
str
stri
stg
What is correct code for INTEGER in Python?
in
ing
int
What is the output from the following code?
print ("hello world")
Hello World
hello world
print hello world
What best defines an IF statement in python?
An If statement performs all code every time the program runs
An IF statement checks to see IF a statement is true or false and then does 1 of 2 things depending on the result.
I am 71 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 a spring chicken!"
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!"
A UK Pound is worth 0.000381 Bitcoin. What data type should be used for the exchange rate?
A float (floating point number)
An integer
A Boolean
A character
Explore all questions with a free account