← Back
Code Challenge 4.3 - Celsius to Fahrenheit Function
Objective
Your task is to write a program that converts a temperature from Celsius to Fahrenheit. This time, we’ll focus on encapsulating the code into functions/methods.
Skills to Practice:
- Defining functions/methods.
- Passing arguments to functions.
- Returning values from functions.
- Utilizing mathematical operations.
Challenge Tasks
- Create a console project named Challenge 4-3.
- Define a function/method to convert Celsius to Fahrenheit.
- Example signatures:
Python
def celsius_to_fahrenheit(celsius):
# code
C#
double CelsiusToFahrenheit(double celsius)
{
// code
}