Prompt the user for their name, and then how many droids, and then how many Wookiees they are looking for. Then print out the name that was given, as well as how many droids and Wookiees they wanted to meet. Here is an example of what you should print: Hi Sean, you want to meet 3 droids and 2 Wookiees.    Side note: pls code using JavaScript, I tried coding with Python but was unsuccessful. Also this is not for a grade, it's so I have have a basis understanding of JavaScript.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

Prompt the user for their name, and then how many droids, and then how many Wookiees they are looking for. Then print out the
name that was given, as well as how many droids and Wookiees they wanted to meet.
Here is an example of what you should print:
Hi Sean, you want to meet 3 droids and 2 Wookiees.    Side note: pls code using JavaScript, I tried coding with Python but was unsuccessful. Also this is not for a grade, it's so I have have a basis understanding of JavaScript.

Expert Solution
Step 1

Algorithm:

  1. Start the program

  2. Use the "prompt" function to request the user's name and store it in a variable "name".

  3. Use another "prompt" function to request the number of droids and store it in a variable "numDroids".

  4. Use another "prompt" function to request the number of Wookiees and store it in a variable "numWookiees".

  5. Use "console.log" to display the message to the user, combining the variables "name", "numDroids", and "numWookiees".

  6. End the program.

 

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT