CJCoding With Joseph
15free / daySign inCreate account

Degrees In Fahrenheit

A Temperature stores celsius as a float. Write the body of to_fahrenheit so it returns the same temperature in Fahrenheit: multiply by 9, divide by 5 and add 32. Do NOT write a main block or any top-level test code; the tests construct the class. Input: one line, the Celsius value, which the tests read as a float, pass to the constructor and use before printing the Fahrenheit value your method returns.

Expected Output:

212.0

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Classes
📥 Auto-Input:
100\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.