0

Please help, don't understand , what did wrong?

x = 1 start = 100 hit = 10 miss = -20 while x < 5: game = input() if game == "hit": start += hit elif game == "miss": start += miss x += 1

7th Jun 2021, 10:22 AM
Расим Багиров
Расим Багиров - avatar
2 Answers
+ 2
Расим Багиров You didn't print start and also there is Indentation problem. Ви не друкували початок, а також є проблема з відступом. x = 1 start = 100 hit = 10 miss = -20 while x < 5: game = input() if game == "hit": start += hit elif game == "miss": start += miss x += 1 print (start)
7th Jun 2021, 11:04 AM
A͢J
A͢J - avatar
+ 1
Thank you, i understand "if" and others need to be inside cycle while, right? So my mistake it's indentation and start word))
7th Jun 2021, 11:17 AM
Расим Багиров
Расим Багиров - avatar