Search Header Logo

Functions

Authored by Elankayer Sithirasenan

Professional Development

Professional Development

Functions
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

30 sec • 1 pt

what key word is used to define a function in Python?

assign

define

func

def

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what keyword is used to return a value from a function?

value

output

def

return

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

how will you call a function with the following definition?

def calculate_gcd(a, b):

gcd(56, 72)

calculate_gcd(56. 72)

calculate(56, 72)

def(56, 72)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what will be the output from the following function?

def my_func(name = "Elan"):

print("My name is " + name + "kayer")

"Elan"

"kayer"

"Elankayer"

"Elan kayer"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what will be returned from the following function if it is called as my_func(6)?

def my_func(a):

return(5*a)

30

5

6

0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the use of the 'pass' statement within a function?

define a function with a parameter

pass a value to the function

define function with no content

define a pass function

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what do you understand by the term 'recursive function?

a function calling itself

a function without parameters

a function with return value

a function with an infinite loop

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?

Discover more resources for Professional Development