
Year 9 - Programming in Python Assessment
Authored by Patrick Dawkins
Computers
9th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following Python lines contains a valid comment?
def get_name(): # get the user’s name
def get_name():
def get_name(): // get the user’s name
def get_name(): % get the user’s name
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following names should pet_name be assigned to make this program print “I think your pet is named Fluffy!”?
Boxer
Fluffy
Stripe
Spot
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would 10 % 3 calculate to?
0
1
2
True
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the most efficient way to shorten the following code?
Use another for loop
Use a parameter value
Use a while loop
Use a repeat loop
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line in the following code contains an error?
Line 1
Line 3
Line 5
Line 7
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would you use if you wanted to ask the user for the number of ounces of water he/she drank that day, and then print one of two messages based on the number?
if
while
for
if/else
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following print statements correctly combines a string variable name and an integer variable age to print out a sentence such as “Charlie is 13 years old”?
print(int(name) + " is” + age + " years old")
print(name + " is " + age + " years old")
print(name + " is " + int(str(age)) + " years old")
print(name + " is " + str(age) + " years old")
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
34 questions
OCR GCSE 1.5 Systems Software MCQs
Quiz
•
8th - 10th Grade
33 questions
06 - BIM - Word Chp. 6 - Mail Merge
Quiz
•
9th - 10th Grade
31 questions
Microsoft Word
Quiz
•
1st - 12th Grade
30 questions
R081 LO1
Quiz
•
9th Grade
32 questions
ASKT2 : Bab 3 : b) Pemalar / Pembolehubah & Input/Output
Quiz
•
8th - 9th Grade
33 questions
Web Design Final Exam Review-HTML
Quiz
•
9th - 12th Grade
34 questions
Code.org: Unit 1 Test
Quiz
•
6th - 9th Grade
31 questions
Microsoft Excel Review
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade