Bonsoir, et un amour est celui qui me répond a cette heure-ci ! Je programme un exercice ou l'on lance 2 dés, et on additionne leur face a chaque lancé.

Pouvez-vous me dire quel est le problème ?

from random import *

N = int(input('Donnez un nombre de lancés des deux de'))
de_1 = 0
de_2 = 0
Total = 0
List = 0
for i in range (N):
Total = 0
de_1 = randint(1,6)
de_2 = randint(1,6)
Total = de_1 + de_2
if Total == 2:
List = list.(2)
elif Total == 3:
List = list.(3)
elif Total == 4:
List = list.(4)
elif Total == 5:
List = list.(5)
elif Total == 6:
List = list.(6)
elif Total == 7:
List = list.(7)
elif Total == 8:
List = list.(8)
elif Total == 9:
List = list.(9)
elif Total == 10:
List = list.(10)
elif Total == 11:
List = list.(11)
elif Total == 12:
List = list.(12)


print(List)
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Lista de comentários


More Questions From This User See All

Recomendar perguntas

Helpful Social

Copyright © 2025 ELIBRARY.TIPS - All rights reserved.