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
Which is a comment?
" 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 Wayground
20 questions
Python_2

Quiz
•
6th - 8th Grade
20 questions
Grade 7 Python Programming Quiz

Quiz
•
7th Grade - University
15 questions
Python End of Topic Quiz

Quiz
•
8th Grade - University
21 questions
Ветвления и циклы в Python. (8 класс)

Quiz
•
8th Grade
12 questions
Python: тестуваня

Quiz
•
8th Grade
15 questions
Python2

Quiz
•
8th Grade - University
11 questions
Python L4 Math Operator

Quiz
•
6th - 8th Grade
20 questions
Python Basics (CodeHS)

Quiz
•
7th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade
25 questions
How to Email a Teacher- https://youtu.be/NioeNhfpVfI

Quiz
•
6th - 8th Grade
20 questions
Computer Hardware

Quiz
•
6th - 8th Grade
21 questions
Gear Ratio Practice

Quiz
•
6th - 8th Grade