Skip to content
Extraits de code Groupes Projets
ex4.py 428 octets
Newer Older
  • Learn to ignore specific revisions
  • Martin Delcourt's avatar
    Martin Delcourt a validé
    
    n_player  = int(input("Combien de joueurs participent ? "))
    n_rounds  = int(input("Combien de tours de jeu ? "))
    
    n_played = 0
    while n_played < n_rounds:
        n_played += 1
        to_say = ""
        if n_played % 5 == 0:
            to_say+="ding-ding "
        if n_played % 7 == 0:
            to_say+="bottle "
        if to_say=="":
            to_say=str(n_played)
    
        to_say = "Joueur {0} : {1}".format(n_played%n_player,to_say)
        print(to_say)