Pybites Logo Rust Platform

Simple Calculations

Level: easy (score: 2)

💡 Individual exercises are great, but nothing beats building a real-world app with Rust. Check out our Rust Intro Cohort Program!

Implement two functions:

  1. celsius_to_fahrenheit that converts a temperature from Celsius to Fahrenheit.
  2. is_even that checks if a number is even.

Example

Given the following inputs, the functions should return the expected results:

let temp_f = celsius_to_fahrenheit(0.0);  // 32.0
let is_num_even = is_even(2);  // true