Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sample Output The vehicle is in chamber ( 0 , 0 ) . The ore in this chamber is 2 . 3 tons. Load the

Sample Output
The vehicle is in chamber (0,0).
The ore in this chamber is 2.3 tons.
Load the ore? (yn):y
The ore in this chamber is 2.3 tons.
Enter the amount to load: 2.3 tons.
Input one of these choices (NS??EW):E
That is the valid exit!
You are now in chamber (1,0).
The ore in this chamber is 4.8 tons.
Load the ore? (yn):y
Enter the amount to load: 3.5 tons.
Input one of these choices (NS??EW):N
That is the valid exit!
You are now in chamber (1,1).
The ore in this chamber is 1.7 tons.
Load the ore? (yn): n
Input one of these choices (NS??EW) : W
That is the valid exit!
You are now in chamber (0,1).
The ore in this chamber is 3.4 tons.
Load the ore? (yn):y
Enter the amount to load: 5.3 tons.
That amount is more than the ore in this chamber!
Enter the amount to load: 1.4 tons.
Input one of these choices (NS??EW):N
Not a valid exit for chamber (0,1). The valid exit is: S
Input one of these choices (NS??EW) : S
That is the valid exit!
You are now in chamber (0,0)
The amount of ore in the vehicle is: 7.2 tons.
image text in transcribed

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

1. What is nonverbal communication?

Answered: 1 week ago