Numbers Everywhere! From Phones to Cars
Read at your own pace. Code execution, quizzes, progress tracking, and the AI tutor are available in the interactive view with JavaScript enabled.
World Speaks Numbers
Tiny math, giant world
Now that we've covered Coding with Colors - Intro to Python and Java, you have seen that code can store labels, lists, and clues.
In this lesson, we zoom out: phones, cars, watches, games, maps, and robots are all quietly using numbers.
A data scientist asks:
- What number was measured?
- What does it describe?
- What unit does it use?
- How can a computer use it to help?
Think of each number as a tiny whisper from the real world.

Phone Number Clues
Your phone is a number collector
A phone does not only show pictures and apps. It also keeps many number clues.
Examples:
Phone clue Example number Meaning Battery 72 72% full Signal bars 3 connection strength Steps today 2840 walking count Brightness 60 screen light level Storage used 48 gigabytes usedFrom earlier lessons, you already know these can live in a dictionary because each number has a label.
```python
phone = {
'battery_percent': 72,
'signal_bars': 3,
'steps_today': 2840,
'brightness_percent': 60,
'storage_used_gb': 48
}
print('Phone snapshot:')
for clue, number in phone.items():
print(clue, '->', number)
print('Battery left:', phone['battery_percent'], '%')
print('Steps today:', phone['steps_today'])
```
Spot The Data
A phone fitness app wants to learn whether you walked more today than yesterday.
Which item is the most useful number data for that question?
Cars Have Sensors
A car is like a rolling data machine
A car has small helpers called sensors. A sensor notices something in the world and turns it into a number.
Examples:
- Speed sensor:
50 km/h - Fuel or battery sensor:
35% - Temperature sensor:
24°C - Tire pressure sensor:
32 psi - Distance sensor:
2 meters from object
The car computer does not feel scared, hot, or fast like a person. It reads numbers, then follows rules and algorithms.

Name The Reading
A car thermometer writes down 22°C, then 23°C, then 23°C again.
Each written sensor number is called a sensor ____.
Units Matter
A number needs its name tag
The same number can mean very different things.
30 by itself is lonely.
But with a unit, it becomes clear:
-
30 minutes= time -
30°C= temperature -
30 km/h= speed -
30 dollars= money -
30 steps= walking count
In data science and machine learning, a number without context can trick us. Good data keeps the label and the unit close to the number.
Tiny rule: number + label + unit = useful measurement.

Same Number?
True or false?
The number 100 always means the same thing in every dataset, even if we do not know its label or unit.
Tiny Trip Dataset
A trip becomes rows of data
Imagine a car writes one row every minute.
Each row is a small snapshot:
- minute number
- speed
- battery percent
- outside temperature
This is like the datasets you will see in data science: many rows, each with useful number clues.
```python
trip = [
{'minute': 1, 'speed_kmh': 0, 'battery_percent': 80, 'temp_c': 21},
{'minute': 2, 'speed_kmh': 30, 'battery_percent': 79, 'temp_c': 21},
{'minute': 3, 'speed_kmh': 45, 'battery_percent': 78, 'temp_c': 22},
{'minute': 4, 'speed_kmh': 40, 'battery_percent': 77, 'temp_c': 22}
]
speeds = [row['speed_kmh'] for row in trip]
batteries = [row['battery_percent'] for row in trip]
typical_speed = sum(speeds) / len(speeds)
lowest_battery = min(batteries)
print('Speeds:', speeds)
print('Typical speed:', typical_speed, 'km/h')
print('Lowest battery:', lowest_battery, '%')
```
Numbers To Actions
Computers use numbers to choose
A useful computer program often follows this path:
real world -> numbers -> code -> helpful action
Example: a phone or car can warn us when a number crosses a limit.
This is not magic. It is the same idea from Fun with Algorithms: Cooking Recipes and Using Computers to Solve Problems: read input, process it, then give output.
```python
battery_percent = 18
distance_to_charger_km = 6
print('Battery:', battery_percent, '%')
print('Distance to charger:', distance_to_charger_km, 'km')
if battery_percent < 20 and distance_to_charger_km > 5:
print('Action: Please charge soon!')
elif battery_percent < 20:
print('Action: Battery is low, but charger is nearby.')
else:
print('Action: Battery looks okay.')
```
Everyday Data Superpower
What you learned
Numbers are everywhere, but useful data is more than just digits.
A good data thinker asks:
- What is being measured? Battery, speed, steps, temperature?
- What is the label? What does the number describe?
- What is the unit? Percent, km/h, °C, meters?
- What can code do with it? Sort it, average it, compare it, warn us, or help us decide.
Phones and cars are friendly examples of a bigger idea: data science, AI, and machine learning begin by turning the world into well-labeled numbers.
Next, we will celebrate how all these math and science ideas connect.
