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
Python Basics

Quiz
•
6th - 8th Grade
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
12 questions
Computer Systems - How the web works - Lesson 7

Quiz
•
8th Grade
17 questions
Python

Quiz
•
6th - 10th Grade
20 questions
Introduction to Python

Quiz
•
7th - 9th Grade
18 questions
PYTHON PRACTICE 1

Quiz
•
8th Grade
16 questions
Y9 refresher

Quiz
•
1st - 9th Grade
20 questions
Basics Python

Quiz
•
8th - 10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
17 questions
guess the logo

Quiz
•
8th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Sentence Fragments and Run-ons

Quiz
•
8th Grade