Test Informed Learning with Examples

Logo

Repository with assignments using the Test Informed Learning with Examples (TILE) method to integrate testing into existing programming courses for free.

Menu

LinkedIN Community

Join our LinkedIN Community.

Celsius to Fahrentheit converter

Implement a program that calculates the temperature in degrees Celsius from the temperature in degrees Fahrenheit. The formula is as follows: \(C = \frac{5}{9}(F-32)\;.\) The input to the program is degrees Fahrenheit introduced by the user. We will save this value in a variable, for example F. Then, the program calculates the expression given by the formula and stores the result in another variable, for example C. The last step will consist of printing the result for the user.

>>> %Run
    Enter the degrees Fahrenheit: 84
    84.0 degrees Fahrenheit are 28.9 degrees Celsius

Run more tests of your program and use the following online converter to check the outputs of your program:

https://www.metric-conversions.org/es/temperatura/fahrenheit-a-celsius.htm

We invite the student to test their program more and compare their
outcomes with a parallel oracle that they can find on the web.