Game Simulator | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Game Simulator

Iā€™m trying to make a game simulator .So far I made it where my teamsļæ¼ļæ¼ can randomly be selected and decide whoā€™s the winnerļæ¼. I want to loop my code and also do the same for my other teamsļæ¼. Do anybody have suggestions on how to do thatļæ¼ļæ¼ļæ¼? https://code.sololearn.com/cIL7C1UcyvrW/?ref=app

4th Oct 2019, 12:45 AM
Armond Jones
1 Resposta
0
Before the while statement initialize a counter variable: i = 0 Then every time the while statement is ran, increment that by 1: i += 1 Append the break after an if statement to compare if we have reached a specific value: if i == 16: break
10th Oct 2019, 10:05 PM
Branam
Branam - avatar