Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You will use the Random function to write the following Java program. Write a program named Dice1.py. You are given two dices. Each dice has
You will use the Random function to write the following Java program. Write a program named Dice1.py.
- You are given two dices.
- Each dice has 6 faces and can generate a number between 1 and 6.
The minimum number generated by the two dice is 2 and maximum number is 12.
Throw the dice and if the number generated is less than or equal to 6 than you lose and if it is greater or equal to 9 than you win and if you get 7 and 8 then it is a tie. You will make use of Random function and a selection structure (if/else) to write the code.
Save the document as Dice1.java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started