From 7308571d4ecfe21f54e8d5364014fe310bbda844 Mon Sep 17 00:00:00 2001 From: Pablo Aguilar Date: Tue, 13 Dec 2022 02:07:33 -0300 Subject: [PATCH 1/3] temperature: swap formulae for Fahrenheit and Celcius They were the wrong way around --- exercises/concept/temperature/.docs/hints.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/concept/temperature/.docs/hints.md b/exercises/concept/temperature/.docs/hints.md index d9fdbdef1..9f53086d4 100644 --- a/exercises/concept/temperature/.docs/hints.md +++ b/exercises/concept/temperature/.docs/hints.md @@ -2,12 +2,12 @@ ## Convert Farenheit to Celsius -- Temperature in degrees Celsius is defined as: T(°F) = T(°C) × 1.8 + 32 +- Temperature in degrees Celsius is defined as: T(°C) = (T(°F) - 32) / 1.8 - The temperature in Farenheit is provided as an `Integer` and must return Celsius as a `Float`. The `fromInteger` function will come in handy. ## Convert Celsius to Farenheit -- Temperature in degrees Fahrenheit is defined as: T(°C) = (T(°F) - 32) / 1.8 +- 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 Farenheit rounded up to the closest `Integer`. The `ceiling` function will come in handy. From d3041847bc20c092e0bbfd87e8956b540b0e6815 Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Tue, 13 Dec 2022 08:12:32 +0000 Subject: [PATCH 2/3] temperature: Correct spellings of Fahrenheit (was Farenheit) --- exercises/concept/temperature/.docs/hints.md | 8 ++++---- exercises/concept/temperature/.docs/instructions.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exercises/concept/temperature/.docs/hints.md b/exercises/concept/temperature/.docs/hints.md index 9f53086d4..5f724c396 100644 --- a/exercises/concept/temperature/.docs/hints.md +++ b/exercises/concept/temperature/.docs/hints.md @@ -1,13 +1,13 @@ # Hints -## Convert Farenheit to Celsius +## Convert Fahrenheit to Celsius - Temperature in degrees Celsius is defined as: T(°C) = (T(°F) - 32) / 1.8 -- The temperature in Farenheit is provided as an `Integer` and must return Celsius as a `Float`. +- 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 +## Convert Celsius to Fahrenheit - 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 Farenheit rounded up to the closest `Integer`. +- 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. diff --git a/exercises/concept/temperature/.docs/instructions.md b/exercises/concept/temperature/.docs/instructions.md index dbe9343e9..60bf97baa 100644 --- a/exercises/concept/temperature/.docs/instructions.md +++ b/exercises/concept/temperature/.docs/instructions.md @@ -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. @@ -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 From 7905b8e3e32b84ffe400488279ef4b816e536762 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Tue, 13 Dec 2022 08:34:25 +0000 Subject: [PATCH 3/3] temperature: number hints, to link them to the tasks --- exercises/concept/temperature/.docs/hints.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/concept/temperature/.docs/hints.md b/exercises/concept/temperature/.docs/hints.md index 5f724c396..aedfb9ee4 100644 --- a/exercises/concept/temperature/.docs/hints.md +++ b/exercises/concept/temperature/.docs/hints.md @@ -1,12 +1,12 @@ # Hints -## Convert Fahrenheit to Celsius +## 1. Convert Fahrenheit to Celsius - 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 Fahrenheit +## 2. Convert Celsius to Fahrenheit - 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`.