Rullst AcademyRullst Academy/Lesson
Rust: first sparks · Lesson 03 / 06

Names that help

The robot keeps seeds. A number alone does not tell the whole story; a name helps explain what it represents.

Learning paths6 min

Let's discover together

  1. 1

    let seeds = 4; binds the name seeds to the value 4. The programmer chose the name. It tells us what the number represents.

  2. 2

    A name without quotes refers to its value. Inside "seeds", the same word is just text. Compare the cards: changing the declared value changes the calculated message.

  3. 3

    Each card is a separate program. We are editing the initial value, not changing a variable during execution. Values declared with let are immutable by default.

✦
YOUR MISSION

Read a let declaration and follow the value used later.

Now it's your turn

Discovery workshop

The robot inventory

The robot compares two inventories and an extra delivery.
Mini experiment

Learning simulation: compare cards and check your predictions. The browser is not compiling Rust or starting a server.

fn main() { let seeds = 4; println!("{}", seeds + 2); }
Build your answers and check when you are ready.
A moment to understand

Which name best explains a seed count?

I need a hint

A descriptive name tells us what we count: seeds.

Loading your journey…

Take it with you

Name three quantities in an invented adventure: water, steps or stars. Avoid personal information.

Show me the Rust behind it

This part is optional. You don't need to memorize the code to continue.

fn main() { let seeds = 4; println!("{}", seeds + 2); }
At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.