NEW
Font size
WorksheetsQuiz 1
Total questions: 10
Worksheet time: 10mins
A store your program must use as an identifier to keep track of a value is called a
Algorithm
Variable
Program
Assignment
Which symbol assigns a value to a variable?
/
+
=
" "
What does the print function do in python?
It's a variable.
It can input data.
It displays an output
It loops the code.
What is the output from the following code?
print ("hello world")
Hello World
hello world
print hello world
What will be the output?
name = "Dave"
print (name)
Dave
'Dave'
name
(name)
Which statement correctly assigns the string "Tanner" to the variable name?
name = print( "Tanner")
input("Tanner")
name = "Tanner"
name = input("Tanner")
The result of this program:
Friday = False
if Friday:
print "Jeans day!"
else:
print "Uniform day"
Jeans day
Today is Friday
Uniform day
Not Friday
Today is Friday
Uniform day
Not Friday
What will the output be from the following code?
print(Hello world!)
Hello world!
SyntaxError
Hello world
print(Hello world!)
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
to if statement
Converts the var (variable) myAge
name=input("What is your name? ")
print("Your name is " + name)
What will be displayed if the user types in "Bob"?
Your name is name
name
Bob
Your name is Bob
