Year 9 - Programming in Python Assessment

Year 9 - Programming in Python Assessment

9th Grade

35 Qs

quiz-placeholder

Similar activities

Python revision Year 9

Python revision Year 9

9th Grade

37 Qs

Strings In java

Strings In java

9th - 10th Grade

35 Qs

Project STEM AP CS A Unit 1

Project STEM AP CS A Unit 1

9th - 12th Grade

34 Qs

EISB Rhapsody'24 Hackathon - Python

EISB Rhapsody'24 Hackathon - Python

9th - 12th Grade

30 Qs

Python02输出输入

Python02输出输入

1st Grade - University

40 Qs

Y10 - Python Quiz 1

Y10 - Python Quiz 1

9th Grade

37 Qs

Python Knowledge Check

Python Knowledge Check

9th - 12th Grade

30 Qs

Computer Pretest1(Python Grade7_t1)

Computer Pretest1(Python Grade7_t1)

3rd Grade - University

30 Qs

Year 9 - Programming in Python Assessment

Year 9 - Programming in Python Assessment

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Patrick Dawkins

Used 2+ times

FREE Resource

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

Media Image

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

Media Image

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

Media Image

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")

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?