WorksheetsY9 Summary
Total questions: 44
Worksheet time: 23mins
What data type would you use to store a person's age in Python?
`float`
`int`
`string`
`boolean`
Which of the following is the correct way to use a selection statement to check if a number is greater than 10?
`if number > 10:`
`if number >> 10:`
`if number = 10:`
`if number == 10:`
What is the result of the arithmetic operation 8×2 in Python?
16
10
82
4
Which relational operator is used to check if two values are not equal in Python?
`=`
`==`
`!=`
`<=`
What data type would you use to store the value `True` or `False` in Python?
`int`
`string`
`boolean`
`float`
How do you represent a floating point number in Python?
By using a decimal point
By using a comma
By using a colon
By using a semicolon
Which of the following arithmetic operators is used for exponentiation in Python?
`*`
`**`
`%`
`/`
What is the output of the relational operation 5<3 in Python?
`True`
`False`
`5`
`3`
In Python, what is the result of the operation 9/2 ?
4
4.5
5
4.0
Which selection statement is used to execute a block of code multiple times based on a condition in Python?
`if`
`for`
`while`
`elif`
What is the correct way to check if `x` is equal to `10` in Python?
`x = 10`
`x == 10`
`x != 10`
`x === 10`
Which of the following is a mutable data type in Python?
`string`
`tuple`
`list`
`int`
Which relational operator is used to check if a value is greater than or equal to another value in Python?
`>`
`<`
`>=`
`<=`
What is the output of the following Python code snippet? ```python x = 10 y = 20 print(x > y) ```
`True`
`False`
`10`
`20`
Which of the following is not an arithmetic operator in Python?
`+`
`-`
`*`
`==`
How do you create a variable with the numeric value 5 in Python?
`x = 5`
`int x = 5`
`x := 5`
`var x = 5`
Which function in Python is used to read input from the console?
`input()`
`read()`
`scan()`
`get()`
What is the default data type in Python?
Real
String
Integer
Number
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 the Python code needed to display a word on the screen?
print"hello"
"hello"
print("hello")
print="hello"
Which character represents a comment in Python code?
*
#
&
$
Select all examples of iteration
FOR loop
WHILE loop
START loop
REPEAT loop
What is the white space used to enter code called?
Whitespace
IDOL
Shell
IDLE
How many variables can you assign in a piece of code?
Depends on your PC's clock speed
256
infinity gauntlet
infinite
What is the term given to breaking down a problem into more, easier to discern steps?
Abstraction
Abtraction
Subtraction
Attraction
How is a 1 or 0 expressed in binary?
As a single binary digit
1 or 0
A Nybble
Half of a Byte
What does an 'IF' statement allow us to do?
Pause the code and allow us to think
Repeat part of the code
Make a decision or branch our code off to another part of the program
Execute the next line of code in order
Convert 1011 0010 into hexadecimal
AA
BC
B2
C1
Convert 1101 1100 into denary
DC
123
21
220
print(3*4+5)
19
Which is the correct formula to multiply?
=B6*C6
B6*C6
B6C6*
*B6C6
What function do you use to add cells together?
SUM
MIN
MAX
AVERAGE
SUM, AVERAGE, MAX and IF are examples of what?
Functions
Tools
Options
Statistical Tools
Which symbol do we use to make an cell an absolute cell (Stays the same)?
%
£
$
!
Changing the appearance of a cell based on a rule is called?
Conditional Formatting
Data Validation
User Input
Sorting
Which of the following is a valid way to start a comment in Python?
//
#
/*
Which of the following is a built-in function in Python?
print()
echo()
write()
display()
