livepython.net

43. Python Program to Print a Temperature Report

HardNone & conversion

Overview

Put the whole chapter together: conversion, maths, f-strings, comparisons and rounding.

Problem Statement

A thermometer gives its reading as the text "36.6" (degrees Celsius). Store that text in a variable, convert it, and calculate the temperature in Fahrenheit with celsius * 9 / 5 + 32. Then print this report:

Temperature report
Celsius: 36.6
Fahrenheit: 97.9
Above 99 F: False
Rounded F: 98

Input

No input is required for this question.

Output

Temperature report
Celsius: 36.6
Fahrenheit: 97.9
Above 99 F: False
Rounded F: 98

Learn this firstChapter 5 · Python None and Type Conversion (int, float, str)
solution.py
# write your code here

EXPECTED OUTPUT

1Temperature report
2Celsius: 36.6
3Fahrenheit: 97.9
4Above 99 F: False
5Rounded F: 98

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.