Autorius: Mihai Nan
The goal is to build a function that converts temperatures from Celsius to Fahrenheit and returns them in a list.
Each temperature is a real number with two decimal places. The conversion formula is:
where:
C is the temperature in CelsiusF is the corresponding temperature in FahrenheitThe function must receive a list of temperatures in Celsius and return a list of temperatures in Fahrenheit, with two decimal places.
train.csvContains three columns:
SampleID – numeric identifier for each temperaturetemperature_c – temperature in Celsiustemperature_f – temperature in FahrenheitExample:
| SampleID | temperature_c | temperature_f |
|---|---|---|
| 1 | 0.0 | 32.0 |
| 2 | 25.0 | 77.0 |
| 3 | 37.5 | 99.5 |
| 4 | 100.0 | 212.0 |
test.csvHas the same structure as train.csv, but without the temperature_f column.
The output file (submission.csv) must contain:
SampleID – same as in test.csvtemperature_f – temperature converted to Fahrenheit, rounded to two decimal placesExample:
| SampleID | temperature_f |
|---|---|
| 1 | 32.00 |
| 2 | 77.00 |
| 3 | 99.50 |
| 4 | 212.00 |
Evaluation will be based on the correctness of predicted values, meaning exact equality between the predicted value and the real value (from the perspective of the first two decimal places):
where N is the total number of examples.
The final score is expressed as a percentage (0–100).
This problem tests: