我如何将参数total向下传递给函数ScoreResult,我一直在想代码的问题是什么
def InputData():
name = input("Enter a name: ")
score = int(input(("Enter a score: ")))
return name, score
def Score():
total = 0
name, score = InputData()
if score <= 100:
total += 10
if score <=20:
total += 2
return total
def ScoreResult(total):
score_result = ""
name, score = InputData()
print(score_result + f"{name} : {total}")
if __name__ == "__main__" :
ScoreResult(total)