This assignment was to write a program that asks the user for a temperature in Fahrenheit and then converts it to Celsius. Then it determines if water freezes, boils or stays a liquid at said temperature.

FtoCatom FtoCcygwin

The new things I used was the while loop and the conditional statements if, elif and else. A while loop executes code repeatedly based on a boolean condition (True/False), a little like the conditional statement. The if statement executes code if a specified condition is true, else executes code if the same condition is false, that is why else always follows an if. Elif is short for else if and it is used to specify a new condition to test, if the first one was false.

All of this statements’ syntax have the condition in parentheses and a colon ( : ) at the end of the condition. The code that is to be executed according to the condition must be indented to the right.

CC BY 4.0 WSQ05-Temperature by carminaperezguerrero is licensed under a Creative Commons Attribution 4.0 International License.