Search Header Logo

Module 2.2

Authored by Harry Riley

Computers

9th - 12th Grade

Used 13+ times

Module 2.2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def lowCase(wordsIn):

....return wordsIn.lower()


Choose the correct output of calling the function above using the following code:


wordsLower = lowCase("Return THIS lower")

print(wordsLower)

"Return THIS lower"

No Output

"return this lower"

An Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Python Function return values must be stored in variables.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

def addNum(num1 = 10):

....return num1 + num1


Choose the correct output of calling the function above using the following code:

print(addNum(100))

20

100

200

an error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many spaces should the second line of a function be indented?

a tab

five spaces

four spaces

it should not be indented

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If I define a function with the three parameters how many arguments will I need to input when I run the code?


Please enter a number value.

1

3

2

4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What must go at the initial line in the defining of a function?

semicolon

colon

double periods

parenthesis

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a return?

print a value

comeback another time

return a value

to reverse the program

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?