【发布时间】:2021-05-28 12:33:58
【问题描述】:
num1=0
Stored_num=23
def input_num():
num1=int(input('Enter the number again: '))
while num1!=stored_num:
input_num()
else:
print('Congrats ! The entered number mathched the stored number')
尽管输入了存储的值,即 23,但上面的代码不接受 else 条件并且不打印消息。
请帮助我理解。
【问题讨论】:
标签: python printing output func alloca