Write a program that prints a custom conversion table from Celsius temperatures to Fahrenheit and Newton (Links to an external site.) temperatures. The formula for the conversion from Celsius to Fahrenheit is : F=9/5*C+32 F is the Fahrenheit temperature, and C is the Celsius temperature. The formula for the conversion from Celsius to Newton is  C = 100/33*N N is the Newton Temperature and C is the Celsius temperature Your program should prompt the user for a lower value and upper value for a range of temperatures in Celsius. It should then prompt the user for the amount they want to increment by. Then use a loop to output to a file named conversion_table.txt a table of the Celsius temperatures and their Fahrenheit and Newton equivalents within the range of values using the increment given by the user. Make sure to format your output to 2 decimal places. INPUT VALIDATION: Ensure the second number is greater than the first number, and make sure the increment is greater than 0.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter2: Formatting Workbook Text And Data
Section: Chapter Questions
Problem 1.8CP
icon
Related questions
Question
Write a program that prints a custom conversion table from Celsius temperatures to Fahrenheit and Newton (Links to an external site.) temperatures. The formula for the conversion from Celsius to Fahrenheit is :
F=9/5*C+32
F is the Fahrenheit temperature, and C is the Celsius temperature.
The formula for the conversion from Celsius to Newton is 
C = 100/33*N
N is the Newton Temperature and C is the Celsius temperature

Your program should prompt the user for a lower value and upper value for a range of temperatures in Celsius. It should then prompt the user for the amount they want to increment by. Then use a loop to output to a file named conversion_table.txt a table of the Celsius temperatures and their Fahrenheit and Newton equivalents within the range of values using the increment given by the user. Make sure to format your output to 2 decimal places.

INPUT VALIDATION: Ensure the second number is greater than the first number, and make sure the increment is greater than 0.

sample output console
Enter the lower value for the conversion table: 0
Enter the upper value for the conversion table: 5
What do you want to use for your increment: .25
Enter the lower value for the conversion table: a
You have not entered a number. Try again.
Enter the lower value for the conversion table: 10
Enter the upper value for the conversion table: 2
Your upper value is less than your lower value. Try again.
Enter the upper value for the conversion table: 11
What do you want to use for your increment: .1
Enter the lower value for the conversion table: 0
Enter the upper value for the conversion table: 10
What do you want to use for your increment: -5
The increment must be greater than 0.
what do you want to use for your increment: 1.5
sample output file
F
N
e.ee
32. 00
e.00
e.25
32.45
e.08
e.50
32.90
e.17
0.75
33.35
e.25
1.e0
33.88
0.33
1.25
34.25
0.41
1.50
34.70
0.49
1.75
35.15
e.58
2.e0
35.60
e.66
2.25
36.05
0.74
2.50
36.5e
e.83
2.75
36.95
e.91
3.e0
37.40
e.99
3.25
37.85
1.07
3.50
38.30
1.16
3.75
38.75
1.24
Transcribed Image Text:sample output console Enter the lower value for the conversion table: 0 Enter the upper value for the conversion table: 5 What do you want to use for your increment: .25 Enter the lower value for the conversion table: a You have not entered a number. Try again. Enter the lower value for the conversion table: 10 Enter the upper value for the conversion table: 2 Your upper value is less than your lower value. Try again. Enter the upper value for the conversion table: 11 What do you want to use for your increment: .1 Enter the lower value for the conversion table: 0 Enter the upper value for the conversion table: 10 What do you want to use for your increment: -5 The increment must be greater than 0. what do you want to use for your increment: 1.5 sample output file F N e.ee 32. 00 e.00 e.25 32.45 e.08 e.50 32.90 e.17 0.75 33.35 e.25 1.e0 33.88 0.33 1.25 34.25 0.41 1.50 34.70 0.49 1.75 35.15 e.58 2.e0 35.60 e.66 2.25 36.05 0.74 2.50 36.5e e.83 2.75 36.95 e.91 3.e0 37.40 e.99 3.25 37.85 1.07 3.50 38.30 1.16 3.75 38.75 1.24
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Basics of loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
CompTIA Linux+ Guide to Linux Certification (Mind…
CompTIA Linux+ Guide to Linux Certification (Mind…
Computer Science
ISBN:
9781305107168
Author:
Jason Eckert
Publisher:
Cengage Learning