Functions Review (codeHS Tracy Python)

Functions Review (codeHS Tracy Python)

Assessment

Flashcard

Computers

6th - 8th Grade

Hard

Created by

Wayground Content

Used 3+ times

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the purpose of a function in Python?

Back

To create reusable blocks of code that can be called multiple times

2.

FLASHCARD QUESTION

Front

What is the correct way to define a function in Python? Options: def myFunction():, function myFunction(), define myFunction[], create function myFunction()

Back

def myFunction():

3.

FLASHCARD QUESTION

Front

Which of the following statements is true about functions in Python?

  • Functions in Python do not require parameters.
,
  • Functions always return a value.
,
  • Functions can only be used once in a program.
,
  • Functions allow us to reuse code in multiple places in a program.

Back

Functions allow us to reuse code in multiple places in a program.

4.

FLASHCARD QUESTION

Front

True to False: You can call a function before you define it.

Back

False

5.

FLASHCARD QUESTION

Front

How would you call the function on line 11?

Back

draw_a_triangle()

6.

FLASHCARD QUESTION

Front

True to False: You will get an error on your screen when you run this program.

Back

True

7.

FLASHCARD QUESTION

Front

How many circles would be shown on the output screen?

Back

1

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?