Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. What is Ebola ? 2.Heart is a muscle? 3. Artificial lighting?

Answered: 1 week ago

Question

1. Which is the most abundant gas presented in the atmosphere?

Answered: 1 week ago