Here you asked the user for the temperature in
Fahrenheit, which can be expressed as a floating point
number. To make sure the variable holds the correct
type, you used the input() function inside the float()
function to convert the string into a floating point
number.
The Mighty print() Function
The print() function provides output that can be
displayed in the user’s terminal. Just like every other
function in Python, it is called with parentheses. This
function is usually the gateway to writing your first code
in Python, as in this example:
>>> print('Hello World')
Hello World
Every line printed with the print() function includes a
newline character (\n) at the end, which is a special
character that tells the terminal to advance one line. If
you use the \n sequence within the print() string, it is
interpreted as a new line, as shown in this example:
>>> print('Hello\nWorld')
Hello
World
There are numerous codes like this that can control how
text is displayed in a string and how Python interprets
the output. Without them, you would not be able to use,
for example, a backslash in your text output. Here are a
few of the most common ones:
\\: Backslash
\b: Backspace
\' : Single quote
\": Double quote
\t: Tab