You've learned how to create variables with let
and the rules for naming them. Now let's practice these fundamentals to make sure they're solid.
Engagement Message
Ready to strengthen your variable skills?
Type
Multiple Choice
Practice Question
Which of these variable declarations follows correct Rust syntax?
Suggested Answers
- A.
let my_score = 100;
- Correct - B.
let 1st_place = "winner";
- C.
let final score = 95;
- D.
let player@ = "Alex";
Type
Fill In The Blanks
Markdown With Blanks
Fill in the blanks to create a variable that stores the number 42 and then print it:
Suggested Answers
- let
- 42
- {}
- answer
Type
Sort Into Boxes
Practice Question
Sort these variable names based on whether they're valid in Rust:
Labels
