Python函数的参数练习案例

发布时间 2023-12-08 23:35:51作者: hugh2023

案例练习:升级版自动查核酸

def check(temperature):
    print("欢迎来到黑马程序员,请出示您的健康码以及72小时核酸证明,并配合测量体温")
    if temperature <= 37.5:
        print("体温测量中,您的体温是:%.1f,体温正常请进!" % temperature)
    else:
        print("体温测量中,您的体温是:%.1f,需要隔离" % temperature)


check(37.8)