小编ark*_*ade的帖子

功能:多个参数

我是 python 新手,目前正在当地大学就读初级 python 课程。这是我获得 ICS 学位的要求。昨天我做了一个测验,问题是“以下什么是参数。我知道 def register_for_class(studen_id, crn): 是参数,我知道函数调用是参数,但其他任何东西都被视为参数吗?我的老师不会告诉我。她只是说,不仅仅是函数调用作为参数。

def register_for_class(student_id, crn): # parameter
    add_class(student_id, crn, 2022, 'Spring')
    student_name = get_name(student_id)
    class_name = get_class(crn)
    msg = student_name + ' is now enrolled in: ' + class_name
    return msg

register_for_class(19283746, 22319) # function call 
Run Code Online (Sandbox Code Playgroud)

python arguments function new-operator

1
推荐指数
1
解决办法
616
查看次数

标签 统计

arguments ×1

function ×1

new-operator ×1

python ×1