Ask Question
4 February, 04:47

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. 4 February, 06:03
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers