Task: Write a script that will inform the user where they should go on vacation and how they should get there. Gather the information with prompts. Use the following table to drive the logic of your program:

Vacation Type Destination
Musical New Orleans
Tropical Beach Vacation in Mexico
Adventurous Whitewater Rafting the Grand Canyon
Group Size Travel Suggestion
1-2 First Class
3-5 Helicopter
6+ Charter Flight

Build Specifications:

  • Declare and initialize the following three variables.
    • vacationType will contain the vacation type choice entered by the user in the first prompt
    • groupSize will contain the party size entered by the user in the second prompt.
    • result is the suggestions to be printed to the console.
  • Use conditional statements to drive the decision making of your program.
  • Create result as a single string using concatenation. This string will contain the vacation type, group size, and destination and travel suggestions (see examples below).
  • Log the result variable to the console.

Example run (user input in bold):

(prompt) What kind of trip would you like to go on,
musical, tropical, or adventurous? ​musical
(prompt) How many are in your group? ​4
(console) Since you’re a group of 4 going on a musical
vacation, you should take a helicopter to New Orleans.

Another example run:

(prompt) What kind of trip would you like to go on,
musical, tropical, or adventurous? ​tropical
(prompt) How many are in your group? ​8
(console) Since you’re a group of 8 going on a tropical
vacation, you should take a charter flight to a beach
vacation in Mexico
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.