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 代碼
刪除
恢復自動保存:
?