Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions exercises/concept/temperature/.docs/hints.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Hints

## Convert Farenheit to Celsius
## 1. Convert Fahrenheit to Celsius

- Temperature in degrees Celsius is defined as: T(°F) = T(°C) × 1.8 + 32
- The temperature in Farenheit is provided as an `Integer` and must return Celsius as a `Float`.
- Temperature in degrees Celsius is defined as: T(°C) = (T(°F) - 32) / 1.8
- The temperature in Fahrenheit is provided as an `Integer` and must return Celsius as a `Float`.
The `fromInteger` function will come in handy.

## Convert Celsius to Farenheit
## 2. Convert Celsius to Fahrenheit

- Temperature in degrees Fahrenheit is defined as: T(°C) = (T(°F) - 32) / 1.8
- The temperature in Celcius is provided as a `Float` and must return Farenheit rounded up to the closest `Integer`.
- Temperature in degrees Fahrenheit is defined as: T(°F) = T(°C) × 1.8 + 32
- The temperature in Celcius is provided as a `Float` and must return Fahrenheit rounded up to the closest `Integer`.
The `ceiling` function will come in handy.
6 changes: 3 additions & 3 deletions exercises/concept/temperature/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You are part of a firefighter organization made of international volunteers.
Due to the international nature of the team, valuable time has been wasted over the last few calls translating between Fahrenheit and Celcius while estimating the temperature inside the burning buildings.
To save time, and people, you decide to create a program to automatically convert between Fahrenheit and Celsius for your international team.

## 1. Convert Farenheit to Celsius
## 1. Convert Fahrenheit to Celsius

Implement the `tempToC` function to convert an `Integer` temperature in Fahrenheit to its equivalent `Float` in Celsius rounded to the nearest hundredth.
Temperature in degrees Celsius is defined as: T(°C) = (T(°F) - 32) / 1.8.
Expand All @@ -14,11 +14,11 @@ Temperature in degrees Celsius is defined as: T(°C) = (T(°F) - 32) / 1.8.
0.00
```

## 2. Convert Celsius to Farenheit
## 2. Convert Celsius to Fahrenheit

Implement the `tempToF` function to convert a `Float` temperature in Celsius to its equivalent in Fahrenheit.
For safety reasons, **round up** the result to the **next-highest** `Integer`.
Temperature in degrees Farenheit is defined as: T(°F) = T(°C) × 1.8 + 32.
Temperature in degrees Fahrenheit is defined as: T(°F) = T(°C) × 1.8 + 32.

```Haskell
> tempToF 4
Expand Down