Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I do this... thanks for your help. I will up vote once done. Pseudocode for the Scuba Application Display -> print() Prompt-> input()

How do I do this... thanks for your help. I will up vote once done.

image text in transcribed

Pseudocode for the Scuba Application

Display -> print()

Prompt-> input()

validLocations ={Australia, Belize, Fiji}

Australia = {

'Great Barrier Reef' : 350,

'Fathom Chasm' : 200

}

Belize = {

'Great Blue Chasm' : 175,

'Rainbow Reef' : 150

}

Fiji = {

'Sunken Ship' : 280,

'Tiger Shark' : 225

}

Display the name of the application

Prompt the user for the country of the dive

Validate the user input for country and as long as it is invalid, keep asking for a valid location

Prompt the user for the number of people on the dive team

Validate the user input for number of people, keep asking for a number greater than 0

Display scuba dives and prices at the country selected by the user

print('Available dives:')

for dive in Australia:

print (dive, "$", Australia[dive])

Validate user input for dive selected

while dive not in Australia:

dive=input('Invalid dive selection. Please re-enter your dive ')

Calculate total= cost of scuba dive selected * team size

Display to the user the name of the location, dive type, the number in the party, and the total due

image text in transcribed

VS CODE LAB - LOOPING & DECISION MAKING Date: Application Title: Purpose: REQUIREMENTS DOCUMENT February 25, 2019 Scuba Expedition Application Program Procedure: Algorithms, Processing, & Conditions: The application calculate the total due for a scuba expedition based on the selected location, dive selected, and number of people in the group. The application allows a user to view scuba expeditions available in various locations around the world and based on the selected location, dive selected, and number of people in the group, calculate the total due. 1. The user will first see the title of the application with a prompt to select one the scuba dive locations: Australia, Belize and Fiji. 2. When the user selects the location, he or she is prompted for the number in the dive team. 3. Once the number in the dive team is entered, the user is shown the scuba dive types in that location, with their associated prices, based on the table below. 4. When the user enters the scuba dive type, the application calculates the total due by multiplying the number in the dive team by the cost of the dive selected. 5. Finally, the application displays the name of the location, dive type, the number in the party, and the total due. 1. Validate user input and display an appropriate error message if the user enters an invalid number from the menu of options or for the number of Notes and Restrictions: users. Location Scuba Dive Cost Australia Great Barrier Reef Fathom Chasm $350 USD $200 Belize Great Blue Chasm Rainbow Reef $175 USD $150 Fiji Sunken Ship $280 USD $225 Tiger Shark Be sure to comment your code and use best practices in naming your identifiers. Location Australia Australia Australia Australia Belize Belize Belize Belize Fiji Fiji Fiji Fiji Dive Great Barrier Reef Fathom Chasm great reef Great Barrier Reef Great Blue Chasm Rainbow Reef rainbow reef Rainbow Reef Sunken Ship Tiger Shark tiger shark Tiger Shark Tiger Shark Team Size Expected Output 2 You have selected Great Barrier Reef dive in Australia for 2 people at a total cost of $700. Thank you! 2 You have selected Fathom Chasm dive in Australia for 2 people at a total cost of $400. Thank you! 2 Please select a dive type form the above options. O Please enter a dive team size greater than 0. 2 You have selected Great Blue Chasm dive in Belize for 2 people at a total cost of $350. Thank you! 2 You have selected Rainbow Reef dive in Belize for 2 people at a total cost of $300. Thank you! 2 Please select a dive type form the above options. O Please enter a dive team size greater than 0. 2 You have selected Sunken Ship dive in Fiji for 2 people at a total cost of $560. Thank you! 2. You have selected Tiger Shark dive in Fiji for 2 people at a total cost of $450. Thank you! 2 Please select a dive type form the above options. Please enter a dive team size greater than 0. 2 Please select a country from the above options

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

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions