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

Python Function Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
Akirapeter Yong
Used 5+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
def greet:
def greet():
function greet():
greet():
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
以下函数调用会输出什么?
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
下列代码的输出是什么?
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
以下代码的输出是?
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')
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Python

Quiz
•
12th Grade
20 questions
function in python

Quiz
•
12th Grade
10 questions
bài 28

Quiz
•
11th Grade - University
10 questions
python2-lesson06

Quiz
•
2nd - 12th Grade
11 questions
Python function output based KVRDSO lucknow

Quiz
•
11th - 12th Grade
10 questions
GDScript Quiz - Lesson 2 - Variables & Functions

Quiz
•
12th Grade
10 questions
l.7. PYTHON FUNCTIONS

Quiz
•
12th Grade
14 questions
Section 4A: Decompose the code using functions

Quiz
•
12th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
14 questions
Attributes of Linear Functions

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
50 questions
Biology Regents Review 2: Ecology

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade