
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
如何正确定义一个名为`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
以下函数调用会输出什么?
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
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Python Programming II CSE A
Quiz
•
12th Grade - University
15 questions
Python. GuiZero
Quiz
•
7th - 12th Grade
20 questions
Quiz Pemrograman Phyton
Quiz
•
9th - 12th Grade
15 questions
PYTHON PROGRAMMING
Quiz
•
11th - 12th Grade
20 questions
LETS PLAY QUIZ - PYTHON CBSE CLASS XII
Quiz
•
11th - 12th Grade
10 questions
统考电脑上册(29/9)
Quiz
•
12th Grade
10 questions
Funciones en Python COSABA
Quiz
•
10th - 12th Grade
10 questions
Python Testing
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade