You've learned that strings are text in quotes like "Hello"
and integers are whole numbers like 42
. Now let's practice identifying these types in different contexts.
Engagement Message
Ready to strengthen your type recognition skills?
Type
Multiple Choice
Practice Question
Which of these values is a string in Rust?
A. 100
B. "100"
C. 3.14
D. true
Suggested Answers
- A
- B - Correct
- C
- D
Type
Fill In The Blanks
Markdown With Blanks
Fill in the blanks to identify the data types:
Suggested Answers
- integer
- string
Type
Sort Into Boxes
Practice Question
Sort these variable declarations based on the type of data they store:
Labels
- First Box Label: String
- Second Box Label: Integer
First Box Items
- let message = "Hi";
- let title = "Game";
Second Box Items
- let score = 95;
