Question: Learning Objectives: More practice with user input/output, including string input. Use of if/else, possibly nested, to solve simple problems. - General Description 1. Write a
Learning Objectives: More practice with user input/output, including string input. Use of if/else, possibly nested, to solve simple problems. - General Description 1. Write a program that asks the user to enter 3 numbers, one at a time. Print the three numbers in sorted order. [Note: no need to use an array or similar structure!] Examples (user input in blue) Enter number1 45 Enter number 1: 55 Enter number 2: 45 Enter number 3: 35 Sorted they are 35 45 55 Enter number 2: 35 Enter number 3: 55 Sorted they are 35 45 55 2. In the same program Write code that will display the following menu: A. Aleppo Pepper B. Banana Pepper C. Cayenne Pepper D. Dragons Breath Enter a letter to choose a pepper: Calculate the Scoville Units (measure of hotness) Aleppo 30,000 Banana-1,000 Cayenne 40,000 Dragon's Breath 2,480,000 Print the Scoville Units for the chosen pepper, example That's 1000 Scovilles of heat! The program should handle both upper and lower case entries... that is 'A or 'a' should print the Scoville Units for the Aleppo. The program should print "That pepper is not on the list" when the user enters anything besides A, B, C, D (or a,b,c,d). You may assume the user will not enter blanks in their answer, but they may enter more than one character As always, the program should end with a pause
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
