Question: Accept d1 and d2, the number on two dices as input. First, check to see that they are in the proper range for dice (1-6).
Accept d1 and d2, the number on two dices as input. First, check to see that they are in the proper range for dice (1-6). If not, print the message "Invalid input". Otherwise, determine the sum. If the sum is 7 or 11, print "Winner". If the sum is 2, 3 or 12, print "Loser". Otherwise print the sum. Snidmi: Input first dice: 2 Input second dice: 5 Winner Input first dice: 1 Input second dice: 1 Loser Input first dice: 3 Input second dice: 5 8 Input first dice: 7 Input second dice: 3 Invalid input Input first dice: 4 Input second dice: 5 9
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
