Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using python Challenge 1: INPUT: There are 5 base camps when climbing Mount Everest. Your fellow mountaineers (let's call them users) are curious about the
Using python
Challenge 1: INPUT: There are 5 base camps when climbing Mount Everest. Your fellow mountaineers (let's call them users) are curious about the different daytime temperatures at basecamps 1, 2, 3, 4, and 5 of Mount Everest, so they can know what kinds of equipment and clothes to bring. Since most of your users are from the USA, they are used to Fahrenheit temperatures. Your first challenge is to write them a program that converts between Fahrenheit and Celsius. a) Using the input() function three times, ask the user to type in Fahrenheit temperatures for basecamp 1, 2, 3. Store the user's input into three new variables base1_fah, base2_fah and base3_fah. You can assume the user will input only valid numerical values, which can be either positive or negative (no letters, punctuation, etc). Hint! Since temperatures are floats and not strings, you will need to do something to the input() function before storing it into your variable. b) For basecamp 4 and basecamp 5, you already know the temperatures in Celsius from your Mount Everest Guidebook. Basecamp 4 is 4.0 degrees Celsius. Basecamp 5 is 0.0 degrees Celsius. Create two new variables base4_cel and base5_cel and store the respective Celsius temperatures into these variables. PROCESSING: a) Convert base1_fah, base2_fah, and base3_fah Fahrenheit temperatures into Celsius. Use this formula below to convert. Store the converted Celsius temperatures into three variables, called base1_cel, base2_cel, base3_cel. (Hint! Be careful of parentheses and the order of calculations! The temperature T in degrees Celsius (C) is equal to the temperature T in degrees Fahrenheit (F) minus 32, times 5/9: T(C) = (T(F) - 32) * 5/9 b) Convert base4_cel and base5_cel Celsius temperatures into Fahrenheit. Store into new variables base4_fah, and base5_fah. The formula to convert from Celsuis to Fahrenheit is: The temperature T in degrees Fahrenheit (F) is equal to the temperature T in degrees Celsius (C) times 9/5 plus 32: T(F) = T(C) * 9/5 + 32 (View next page for output) OUTPUT: Print out the converted temperatures, like in the output below. SAMPLE INPUT AND EXPECTED OUTPUT: Example 1: What is the Fahrenheit temperature for basecamp 1? 60 What is the Fahrenheit temperature for basecamp 22 50 What is the Fahrenheit temperature for basecamp 3? 30, Base 1's temperature in Celsius is: 15.555555555555557 Base 2's temperature in Celsius is: 10.0 Base 3's temperature in Celsius is: -1.1111111111111112 Base 4's temperature in Fahrenheit is: 39.2, Base 5's temperature in Fahrenheit is: 32.0 Example 2: What is the Fahrenheit temperature for basecamp 1? 32.4 What is the Fahrenheit temperature for basecamp 2? 28.1 What is the Fahrenheit temperature for basecamp 3? 15.09 Base 1's temperature in Celsius is: 0.22222222222222143 Base 2's temperature in Celsius is: -2.166666666666666 Base 3's temperature in Celsius is: -9.394444444444446 Base 4's temperature in Fahrenheit is: 39.2, Base 5's temperature in Fahrenheit is: 32.0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started