Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help Please! Looking for a good and detailed explanation for concrete understanding on the entirety of the code! I am here to learn! PLEASE USE
Help Please! Looking for a good and detailed explanation for concrete understanding on the entirety of the code! I am here to learn!
PLEASE USE JS
- Prompt the user to input the number of hits they are going to attempt to hit the dragon with up to 5.
- Have the user deal a random amount of damage, between 1 and the number they input, to the dragon. If the random number is above 5, have the user deal only 1 damage to the dragon.
- Then, have the dragon randomly deal either 1 damage or 2 damage to the user.
- Once the dragon takes 10 damage, the user wins.
- Once the user takes 5 damage, the user loses.
Use for while/while/lets/message prompts
Please show outputs
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