The variable 'k' is not updating at the end of If statement ( unless I updating it inside If statement ). Which is the right way or the explanation?thx
lvl = 1
k = lvl * 10
while lvl <= 10:
user = int(input(" "))
if user == 5:
lvl += 1
'k = lvl * 10'
print(lvl)
print(k)
Aucun commentaire:
Enregistrer un commentaire