NEW
Font size
WorksheetsMs. Ayesha's Python Quiz
Total questions: 20
Worksheet time: 14mins
What in the name of the variable in this Python code?
name
input
("What is your name")
What does the following code do? myAge = int (myAge)
Converts the var (variable) myAge to a string
Converts the var (variable) myAge to a integer
Converts the var (variable) myAge from a integer to a string
Converts the var (variable) myAge to if statement
is integer a number
true
false
is boolean a data type or a condition
data type only
data type and condition only
condition only
It displays an output
light_sensor= int(input("Enter the light sensor reading value (between 0 - 1023): "))
if light_sensor< 100:
print("Dark")
else:
print("Light")
What will be printed when the user enters the number 55?
Light
Dark
Nothing
Error
mark =95
print ("mark")
what is the output?
mark
95
mark =95
mark =95
print (mark)
what is the output?
mark
95
mark =95
What is the final value of the variable?
4
5
9
What is the data type of the variable number?
string
int
float
print(3*4+5)
fruits = ["apple","banana","orange"]
print(fruit[0])
What will be the output of this program?
["apple","banana","orange"]
apple
banana
orange
What will be printed after running this FOR loop:
for number in range(0, 6):
print(number)
6
0, 1, 2, 3, 4, 5
5
0, 1, 2, 3, 4, 5, 6
