Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. import random
  2. dice1 = random.randrange(1, 6)
  3. dice2 = random.randrange(1, 6)
  4. dice3 = random.randrange(1, 6)
  5. dice4 = random.randrange(1, 6)
  6. dice5 = random.randrange(1, 6)
  7. first_number = input("Pick the postion of your dice 1: ")
  8. second_number = input("pick the postion of your dice 2: ")
  9.  
  10. print("Your dice: ", dice1, dice2, dice3, dice4, dice5)
  11.  
  12. print(" Tens?",(first_number))
  13. print(" Units?",(second_number))
  14. position1 = len(first_number)
  15. position2 = len(second_number)
  16.  
  17. first_die = (position1 * (10))
  18. second_die = (position2 *(1))
  19. total = (first_die + second_die)
  20. print("Dice value: ", total)
  21. print("Your current total:", total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement