Search Header Logo

Quiz về Hàm trong Python

Authored by Hoan Kim

Computers

10th Grade

Used 2+ times

Quiz về Hàm trong Python
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 keyword is used to declare a function in Python?

define

def

function

fun

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What value does a function without a return statement return?

0

False

None

Empty string

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the parameters passed into a function called?

Variables

Arguments

Keywords

Returns

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to define a function with 2 parameters?

def func[x, y]

function func(x, y):

define func(x; y):

def func(x, y):

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the return keyword?

Output value to the screen

End the loop

Input value

End the function and return a value

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about variable scope in a function?

Variables in a function are called local variables

Variables in a function do not affect outside variables

Variables in a function are global variables

Variables in a function cannot be used

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a function be defined inside another function?

No

Yes

Only in a class

Only when there are no parameters

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?