Welcome to Westonci.ca, your one-stop destination for finding answers to all your questions. Join our expert community now! Discover a wealth of knowledge from experts across different disciplines on our comprehensive Q&A platform. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

1. Design a program that will accept the height and length of a vehicle and determine to which class the
vehicle belongs. Vehicles less than 1.7m in height belong to Class 1. For vehicles 1.7m and higher, if the
length is less than 5.5m, the vehicle belongs to Class 2, otherwise the vehicle belongs to Class 3. Output
the class. In addition to the IPO, pseudocode OR flowchart please do trace table and PYTHON Code
2. Write a program that will monitor the weather and road conditions of the Flat Bridge in St. Catherine
and display a warning sign accordingly. Accept values for the type of weather (Rainy or Dry) and the
condition of the road (Flooded or Wet). If the weather is rainy, then if the road is flooded, display “Road
flooded...please detour”, otherwise display “Road wet...drive with caution”. If it is not rainy (i.e. dry),
display “Safe journey...drive with care”.
In addition to the IPO, pseudocode OR flowchart please do trace table and PYTHON Code
3. Consider the following pseudocode design:
START
DECLARE num, x AS INTEGER
PRINT "Please enter a number between 1 and 20:"
READ num
IF num % 5 == 0 THEN
PRINT “Number is divisible by 5”
ELSE
PRINT “Number is not divisible by 5”
ENDIF
STOP
Write the portion of pseudocode that would validate the value provided for the variable num and output
an appropriate message if the value is invalid. Translate your design to PYTHON
4. Use the CASE structure to evaluate a character variable called vacType and print one of the following
messages, depending on its value:
(i) “Cruise”, if the value of vacType is C
(ii) “Hotel”, if the value of vacType is H
(iii) “Flight”, if the value of vacType is F
(iv) “Invalid”, if vacType has any other value.
Design a program that will simulate a customer carrying out ONE transaction at an ATM. The customer
is to be presented with a menu similar to that shown below:

Check Balance
Deposit
Withdrawal
Enter Choice:

Assume the starting balance is $30,000. The following are to be incorporated in the program after
accepting an option from the user:
• The deposit amount must not be greater than $100,000
• The withdrawal amount must not be greater than $17,000
• Any negative amounts entered should trigger an error message (at this time, do not allow the
user to re-enter values)
• Output the new balance


Sagot :

We appreciate your visit. Our platform is always here to offer accurate and reliable answers. Return anytime. We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. Westonci.ca is your go-to source for reliable answers. Return soon for more expert insights.