Python Class 1 variables, print, operations
Quiz
•
Computers
•
1st - 5th Grade
•
Hard
doosuf ]
FREE Resource
Enhance your content
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is the variable?
'Fred'
name
=
Answer explanation
name is the variable, 'Fred' is the string stored in the variable, print is the function, = is the assignment operator
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code would print out:
nothing, it will return an error
7
8
Answer explanation
you can do operations in function input
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After this code executes, what is the value of name
'Elisa'
'John'
'Fred'
'Jane'
Answer explanation
it's 'Elisa' because that was the last update made to the variable
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which error would occur when this program is run?
no error
NameError: name 'Name' is not defined
TypeError: Can't convert 'int' object to str implicitly
NameError: name 'Bob' is not defined
Answer explanation
variables are case sensitive, a variable called Name is NOT EQUAL to a variable called name
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to do floor division?
n1 ** n2
n1/n2
n1//n2
n1 * n2
Answer explanation
// is floor division
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
How would I print out my age? (concatenation, tuples, output formatting)
print("Age: " + age)
print("Age:",age)
print("Age: %s" % (age))
print("Age: age")
Similar Resources on Wayground
10 questions
Revision
Quiz
•
3rd - 5th Grade
10 questions
Internet services-Venesha
Quiz
•
3rd - 6th Grade
10 questions
Quiz 9 (15.09.2021)
Quiz
•
1st - 12th Grade
10 questions
Python
Quiz
•
3rd - 10th Grade
8 questions
Logo Quiz
Quiz
•
5th Grade
10 questions
MS OFFICE
Quiz
•
1st Grade
10 questions
Photography project
Quiz
•
3rd - 6th Grade
10 questions
Funciones en Excel
Quiz
•
5th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade