Menu
Coddy logo textTech

Recap - Initialize Variables

Part of the Fundamentals section of Coddy's Rust journey — lesson 13 of 75.

challenge icon

Challenge

Beginner

Write code that initializes the following variables:

  • k with the value 88
  • pi with the value 3.14
  • name with the value “bob”

Try it yourself

fn main() {
    // Type your code below

    
    // Don't change the lines below
    println!("k = {}", k);
    println!("pi = {}", pi);
    println!("name = \"{}\"", name);
}

All lessons in Fundamentals