Python Function Quiz

Python Function Quiz

12th Grade

15 Qs

quiz-placeholder

Similar activities

Python Functions 1

Python Functions 1

12th Grade

12 Qs

Introduction to Programming (Ch2)

Introduction to Programming (Ch2)

9th - 12th Grade

16 Qs

10_03 ITサービスマネジメント

10_03 ITサービスマネジメント

1st - 12th Grade

12 Qs

مراجعة الوحدة 3 ( البرمجة بواسطة المايكروبت )

مراجعة الوحدة 3 ( البرمجة بواسطة المايكروبت )

12th Grade

10 Qs

第八章 系统软体

第八章 系统软体

12th Grade

11 Qs

การเขียนโปรแกรมภาษา python ม.5 ภาคเรียนที่ 2 ปีการศึกษา 2561

การเขียนโปรแกรมภาษา python ม.5 ภาคเรียนที่ 2 ปีการศึกษา 2561

10th - 12th Grade

20 Qs

Python Data Types

Python Data Types

9th - 12th Grade

15 Qs

OCR GCSE Computer Science Subroutines

OCR GCSE Computer Science Subroutines

12th Grade

19 Qs

Python Function Quiz

Python Function Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Akirapeter Yong

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

如何正确定义一个名为`greet`的无参数函数?
How to correctly define a parameterless function named greet?

def greet:

def greet():

function greet():

greet():

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

以下函数调用会输出什么?
What is the output of this function call?

A. 5

B. 3

C. 报错

D. None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下哪个关键字用于从函数返回值?
Which keyword is used to return a value from a function?

`return`

`break`

`exit`

`output`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

下列代码的输出是什么?
What is the output of this code?

5

10

报错

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

如何定义一个接受任意数量位置参数的函数?

How to define a function that accepts any number of positional arguments?

`def func(*args):`

`def func(args):`

`def func(**kwargs):`

`def func(*):`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

以下代码的输出是?

What is the output of this code?

A. "HiHiHi"

B. "Hi3"

C. 报错

D. `3`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

哪个选项可以正确调用函数

Which option correctly calls the function

`process(data, mode='fast')`?

process(mode='slow', data)

process('slow', data)

process(data, 'slow')

process(data, mode='slow')

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?