变量“k”在If语句的末尾没有更新(除非我在If语句中更新它)。哪个是正确的方式或解释?
lvl = 1
k = lvl * 10
while lvl <= 10:
user = int(input(" "))
if user == 5:
lvl += 1
'k = lvl * 10'
print(lvl)
print(k)
茅侃侃
相关分类