Coding · Grade 5
Variables, Types and Input
Fifth graders learn the main data types (whole and decimal numbers, text and Booleans), see how + adds numbers but joins text, handle user input that arrives as text by converting it with NUMBER and TEXT, and choose sensible types and names when designing a program's data.
- 4 lessons
- About 90 minutes
- Types and input check: 8 questions
- Ways to answer: choose an answer, trace code, highlight a text, match pairs, type a number and sort into groups
What learners will discover
- Identify data types: whole numbers, decimal numbers, text (strings) and Booleans.
- Predict results that depend on type, such as "5" + "5" joining to 55 while 5 + 5 adds to 10.
- Convert typed input to a number before doing arithmetic, and convert numbers to text to join them to words.
- Choose a sensible type and name for each piece of a program's data.
Lessons
-
Types of data 4 steps2 practiceabout 16 min
-
Types change results 5 steps3 practiceabout 16 min
-
Input is text 5 steps3 practiceabout 17 min
-
Choose types and names 5 steps2 practiceabout 15 min
-
Types and input check 8 questions at the end
Keep exploring
Games to practice with
- Robot RoutesSnap together arrow, repeat and dance blocks to guide Bolt the robot home.
- Bug DetectiveA robot program almost works. Run it, spot the buggy block, and fix it.
- Sorting FactoryTurn a work order into if/else rules and watch the conveyor sort every item.
More 5th grade coding
- 5th Grade Coding Games5 games to play free
- 5th Grade Coding Worksheets10 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read