Quiz 4

Quiz 4

University

10 Qs

quiz-placeholder

Similar activities

[Quiz] Python Function

[Quiz] Python Function

University

12 Qs

HTML + CSS + JS

HTML + CSS + JS

University

10 Qs

AverageRound

AverageRound

University

10 Qs

Search questions from Quizizz Library

Search questions from Quizizz Library

University

13 Qs

Mastering Python Functions

Mastering Python Functions

University

10 Qs

Bài 27

Bài 27

10th Grade - University

15 Qs

Fundamentos de Programación en Python

Fundamentos de Programación en Python

6th Grade - University

10 Qs

JS#2

JS#2

University

9 Qs

Quiz 4

Quiz 4

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Wai Li

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which keyword is used to define a function in Python?
func
function
def
define

2.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What is the correct way to call this function?

def greet():

print("Hello!")

call greet()
greet()
print greet()
def greet()

3.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What does the return keyword do in a function?
It exits the program
It prints a value
It sends a value back to the caller
It pauses the function

4.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Media Image
23
5
a + b
Error

5.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Media Image
test
Done
None
Error

6.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which of the following statements about function parameters is correct?

Functions never need parameters
Parameters are values returned by a function
Parameters allow functions to receive input values
Parameters are only used with the print() function

7.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which of the following is a parameter in this function definition? def double(x): return x * 2

def
double
x
None

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?

Discover more resources for Information Technology (IT)