WorksheetsVariables & Conditional Statements
Total questions: 10
Worksheet time: 5mins
What function is used in Python to get users input or response?
input
input<>
input()
INPUT()
favnum = 10
fav num = 10
fav num is 10
favnum == 10
What symbol is used in python to assign values to a variable?
:
*
=
==
What will be printed?
animal = ("frog")
place = ("pond")
print("The", animal, "jumped into the", place)
Nothing will print
The animal jumped into the place
The "frog" jumped into the "pond"
The frog jumped into the pond
What is the difference between an input statement and a print statement?
input() requires a response from the user. print() displays output.
there is no difference
input() displays output. print() requires a response from the user.
Which is the best way to ask the user for a number so you can use it later?
num = input(“Enter a number: ” )
num = input (“4” )
laptops=36
What is the name of the variable?
laptops
=
36
variable
greeting = ("Hello World")
What is the value of the variable?
greeting
=
Hello World
there is no value
What will be printed?
A
B
3
4
What will be printed if the user enters 7?
47
7
winner!
you didn't win
