Search Header Logo

Python: Functions and Parameters

Authored by Karen Koelm

Computers

9th - 12th Grade

Used 130+ times

Python: Functions and Parameters
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is the correct code to define a function?

def area ( ):

area ( )

def area:

def area ( )

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is the correct way to call a function?

def distance ( ):

distance

distance ( )

distance ( ):

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

In the provided code, which variables have not been defined?

dist

d

rate

time

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

In the provided code, which values are parameters?

rate

5

time

8

d

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

In the provided code, which values are arguments?

rate

time

5

8

d

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What are the valid data types for the parameters/arguments of the pre-built function, math.sprt ( ) ?

integer

float

boolean

string

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct data type for the value of cat?

cat = input("How many cats do you have?")

string

integer

float

boolean

Access all questions and much more by creating a free account

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

Already have an account?