WorksheetsPython Basics Quiz (2nd year_1st_term)
Total questions: 12
Worksheet time: 9mins
How to take inputs from the user?
input( )
print( )
enter( )
write( )
How to store 5 in a variable called x?
x -> 5
x = 5
x == 5
5 = x
what symbols can be used in the variable names?
(you can choose more than one answer)
an undescore (_)
minus sign ( - )
a space ( )
a slash (/)
How to define to define two variables containing numbers in their names?
x1 = 5
x2 = 6
1x = 5
2x = 6
1_x = 5
2_x = 6
x_1 = 5
x_2 = 6
Imagine that you are working on a large code and used input() to take data from the user but you don't know the type of the value stored in a certain variable. How can you know the type?
kind( )
type( )
like( )
Type( )
what is the result of this code?
0
-50
100
error
what does / do in mathematical equations?
calculate the whole result
calculate the remainder
calculate the integer value of the division
error
what does % do in mathematical equations?
calculate the whole result
calculate the remainder
error
calculate the integer value of the division
how to use ** to take the square root of 9?
(you can choose more than one answer)
9**0.5
9**1/2
9**(1/2)
9**(2/4)
What would happen if I used + between two strings?
error
the second string will be added on the right of the first string
the first string will be added on the right of the second string
what is the result of '5' * 4?
'20'
'5555'
'55555'
'44444'
Draw something in three minutes

