Which is a comment?
Python Revision

Quiz
•
Computers
•
8th Grade
•
Medium

Chloe Wilkes
Used 19+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
" this is a comment "
# this is a comment
this is a comment
# this is a comment #
Answer explanation
Comments start with a #. " initiates a string.
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Find the invalid name for a variable
My_name
myName
1Name
My Name
@MyName
Answer explanation
A variable can't have spaces between the words and numbers or symbols at the start.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code will not generate an error?
Firstname = input()
print("Hello,",firstname)
firstname = input()
print("Hello," firstname)
firstname = input()
print("Hello," ,firstname)
firstname = input ()
print("Hello, firstname")
Answer explanation
This code is using concatenation!
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code will print "h"?
planet = "Earth"
print(planet[5])
planet = "Earth"
print(planet[4])
planet = "Earth"
print(planet,[4])
planet = "Earth"
print(planet,[5])
Answer explanation
Python codes always start counting at 0!
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code print out? number = "5" + "10"
print(number)
15
5 10
510
An error
Answer explanation
This code is a string and it will only print out 5 and 10 like 510. If you wanted it to be 15 then you wouldn't put the " ".
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type...
Holds alphanumeric data as texts
String
Float
Integer
Boolean
Answer explanation
It's a string!
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Strings are represented in code as....
str
int
float
Answer explanation
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Python2

Quiz
•
8th Grade - University
20 questions
Intro to Python Vocabulary

Quiz
•
7th - 12th Grade
12 questions
Python Programming Basics

Quiz
•
7th - 11th Grade
15 questions
Python Part 1

Quiz
•
8th Grade
12 questions
Lesson 9 - The internet

Quiz
•
8th Grade
15 questions
Python Basics

Quiz
•
6th - 8th Grade
12 questions
S3 Python 1

Quiz
•
8th - 10th Grade
20 questions
Basics Python

Quiz
•
8th - 10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
15 questions
Volume Prisms, Cylinders, Cones & Spheres

Quiz
•
8th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
25 questions
Argumentative Writing & Informational Text Vocabulary Review

Quiz
•
8th Grade
18 questions
Informational Text Vocabulary

Quiz
•
7th - 8th Grade