Question: . Write a script that simulates the rolling of two dice. Create a variable called DI _ 1 and DI _ 2 . Set each

. Write a script that simulates the rolling of two dice. Create a variable called DI_1 and DI_2. Set each of those variables to a random integer between 1 and 6(inclusive). Display the number rolled on each die. Use an if/else construct to display a message to the player showing the sum of the two dice and stating whether the player won the game. If the sum of the values rolled is an even number, the player wins. Otherwise, the player loses.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!