1) Which is a loop structure? a) return b) for c) def d) if-else 2) What does 'return' do in a function? a) Defines function b) Starts loop c) Ends loop d) Returns value 3) How to return two values? a) return a b b) return a + b c) return a, b d) return (a) 4) What is a parameter? a) Loop variable b) Function input c) Return value d) String method 5) Which is a conditional statement? a) if b) def c) for d) while 6) What keyword defines a function? a) def b) return c) if d) loop 7) Which is not a loop? a) for b) while c) if d) do-while 8) What is a default parameter? a) Return type b) No value c) Loop counter d) Predefined value 9) How to call a function? a) function() b) return function c) call function d) def function 10) If a function is defined to return two distinct values, such as an integer and a string, and the result is assigned to a single variable, what will that variable contain? a) Only the first value (the integer), with the second value being discarded. b) Only the second value (the string), with the first value being discarded. c) A tuple containing both values, which allows the single variable to hold a sequence of multiple items. d) A list containing both values in the order they were returned.
0%
Control Structures and Functions in Python
共享
共享
共享
由
Ligonangel
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
问答游戏
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?