Ask Question
19 April, 06:43

Write a program that will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three double values. The first values are starting and ending temperatures. The third value is the increment value. There is no prompt for the input. There is an error message that can be displayed.

+1
Answers (1)
  1. 19 April, 07:26
    0
    start = float (input ())

    end = float (input ())

    increment = float (input ())

    if start 0:

    print ("Fahrenheit / t Kelvin / t Celsius")

    for f in range (int (start), int (end), int (increment)):

    k = 5.0/9.0 * (f - 32) + 273.15

    c = (f - 32) / 1.80

    print ("%.2f" % f + "/t/t" + "%.2f" % k + "/t/t" + "%.2f" % c)

    else:

    print ("Invalid input!")

    Explanation:

    The code is in Python.

    Let the user enter three values, start, end, and increment

    Check the values. If start is smaller than or equal to end and increment is greater than zero:

    Create a for loop that iterates between start and end with the increment value. Convert each of the value to kelvin and celsius using the formulas. Print the each value.

    Otherwise, print invalid input
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a program that will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three double ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers