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
14 questions
Python Basic Unit 1

Quiz
•
7th - 8th Grade
17 questions
Python KS3

Quiz
•
8th Grade
19 questions
Python Year 9 Quiz

Quiz
•
8th - 10th Grade
20 questions
Python year 9

Quiz
•
8th - 11th Grade
11 questions
Quiz#2

Quiz
•
6th - 8th Grade
15 questions
Python Basics

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

Quiz
•
8th Grade - University
20 questions
Basics Python

Quiz
•
8th - 10th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Hallway & Bathroom Expectations

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

Interactive video
•
6th - 10th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
24 questions
Flinn Lab Safety Quiz

Quiz
•
5th - 8th Grade
15 questions
Wren Pride and School Procedures Worksheet

Quiz
•
8th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
10 questions
Converting Repeating Decimals to Fractions

Quiz
•
8th Grade