- 1
- 0
- 约9.85千字
- 约 16页
- 2026-04-26 发布于湖南
- 举报
英语函数题目及答案
一、单项选择题(总共10题,每题2分)
1.WhichofthefollowingisacorrectwaytodefineafunctioninPython?
A)functionmy_function():
B)defmy_function():
C)functionmy_function():
D)funcmy_function()
Answer:B
2.WhatistheoutputofthefollowingPythonfunctioncall?
defadd(a,b):
returna+b
print(add(3,5))
A)8
B)10
C)3+5
D)Error
Answer:A
3.InPython,whatkeywordisusedtoindicatetheendofafunction?
A)end
B)finish
C)return
D)stop
Answer:C
4.WhatwillbetheoutputofthefollowingPythoncode?
defgr
原创力文档

文档评论(0)