r/pythonhelp • • Apr 02 '21

HOMEWORK Nested loops assignment

I am doing a hw assignment in programming that asks to make the following:

  1. The program will ask the user for a number between 2 and 12

  2. The program will roll two virtual dice using the random library

  3. If the number rolled is the number the user chose the program will print “you win” or a similar message

  4. If the number rolled is not the number the user chose the program will tell the user you rolled a __ but your number is ___ hit any key to roll again

  5. The user will continue to roll the dice until they get the right number. The program will tell them how many turns it took them to roll their number

3 Upvotes

1 comment sorted by