Python function

Python function

Assessment

Flashcard

Computers

University

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

12 questions

Show all answers

1.

FLASHCARD QUESTION

Front

__________ keyword is used for creating a function in Python.

Back

def

2.

FLASHCARD QUESTION

Front

What will be the output of the following Python code?
def cube(x):
return x * x * x
x = cube(3)
print (x)

Back

27

3.

FLASHCARD QUESTION

Front

Which of the following refers to mathematical function? Options: sqrt, rhombus, add, rhombus

Back

sqrt

4.

FLASHCARD QUESTION

Front

What are the two main types of functions?

Back

Built-in function & User defined function

5.

FLASHCARD QUESTION

Front

Which are the advantages of functions in python?

Back

Reducing duplication of code, Decomposing complex problems into simpler pieces, Improving clarity of the code

6.

FLASHCARD QUESTION

Front

Do you call or define a function first?

Back

define

7.

FLASHCARD QUESTION

Front

What will print? Options: nothing, 5, 6, an error message

Back

nothing

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?