Python Programming MP4 EMPA Review Part 2

Python Programming MP4 EMPA Review Part 2

9th - 12th Grade

18 Qs

quiz-placeholder

Similar activities

CS3 Week 1 Python Terms

CS3 Week 1 Python Terms

9th - 12th Grade

20 Qs

Python Functions

Python Functions

9th Grade

20 Qs

Python Functions

Python Functions

12th Grade

23 Qs

User Defined Functions

User Defined Functions

12th Grade

20 Qs

Python Functions and Error Handling

Python Functions and Error Handling

10th Grade - University

20 Qs

ASK T3-STRUKTUR KOD ARAHAN

ASK T3-STRUKTUR KOD ARAHAN

9th Grade

15 Qs

การเขียนโปรแกรมภาษาคอมพิวเตอร์ หน่วยที่ 4 ฟังก์ชั่น 20 ข้อ

การเขียนโปรแกรมภาษาคอมพิวเตอร์ หน่วยที่ 4 ฟังก์ชั่น 20 ข้อ

10th Grade

20 Qs

Python functions

Python functions

11th Grade

18 Qs

Python Programming MP4 EMPA Review Part 2

Python Programming MP4 EMPA Review Part 2

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Lisa Zaranski

Used 2+ times

FREE Resource

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image
  1. Only one parameter can have a default value given

  1. Any parameters that don’t have default values must come before any parameters that do have default values

  1. Default parameters must be the same type for every parameter

There is nothing wrong with the function

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

  1. Which of the following Python lines contains a valid comment?

  1. def get_name():    # get the user’s name

  1. def get_name():

  1. def  get_name():   ** get the user’s name

def  get_name():   % get the user’s name

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following for loops will loop 12 times?

for i in range(12):

for i in range(1, 12):

for i in range(0, 11):

for i in range(1, 12, 1):

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

2

8

12

20

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Three of the for loops below will provide identical values for i. Which for loop will provide values that do not match the others?

for i in range(0, 5):

for i in range(5):

for i in range(0, 5, 1):

for i in range(5, 0, 1):

6.

MULTIPLE CHOICE QUESTION

45 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

45 sec • 1 pt

When would a while loop be a better control structure to use than a for loop?

When you need to repeat multiple commands

When you need to repeat something 5 times

When you don’t know how many times something will need to repeat

When the user is inputting how many times to repeat something

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?