1) What will this code print? a) PythonPython b) Python*2 c) Python2 d) Python 2) What is the main difference between a procedure and a function in Python? a) A procedure can return a value b) A function can return a value c) A function takes parameters d) A procedure takes parameters 3) Which keyword is used to define a function in Python? a) def b) define c) function d) func 4) What will this function return? a) 34 b) xy c) x + y d) 7 5) What is a parameter in a function? a) A variable returned by the function b) The value passed to a function c) The function name d) A placeholder variable inside the function definition 6) What is an argument in Python functions? a) The value you pass into a parameter when calling a function b) A variable inside a function c) The value returned by a function d) A loop condition 7) What will this code output? a) Hello b) Hello name c) Hello Sam d) Sam 8) What is the return type of this function? a) str b) bool c) int d) True 9) Which of these correctly defines a function with two parameters? a) def myFunc(a, b): b) def myFunc(a b): c) def myFunc(a + b): d) def myFunc(ab): 10) What will this code output? a) n b) 5 c) 55 d) 25
0%
Python Functions Quiz
共享
共享
共享
由
Karenahmed81
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
输赢测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?