Talk to the Computer
beginner25 XP

Python the Calculator

Do farm math and solar-power math in a flash.

Python the Calculator 🧮

Farmers, engineers and space scientists do a LOT of math. Python can do it in a blink.

SymbolMeansExampleAnswer
+add5 + 38
-subtract10 - 46
*multiply6 * 848
/divide10 / 25.0
Python
print(5 + 3)
print(6 * 8)
💡

🧠 Dividing with / always gives a number with a dot, like 5.0.

🌽 Farm math

A farmer plants corn in rows. How many plants is that?

Python
rows = 12
plants_per_row = 20
total = rows * plants_per_row
print("Corn plants:", total)

That shows Corn plants: 240. Imagine counting that by hand!

☀️ Solar power math

Solar panels turn sunlight into electricity, with no smoke and no pollution.

Python
panels = 4
energy_per_panel = 3
print("Energy today:", panels * energy_per_panel)

Math with variables

You can change a box using its own value:

Python
apples = 10
apples = apples + 5
print(apples)

That prints 15. Python works out the right side first (10 + 5), then puts the answer back into the box.

💧 Fun fact

Growing food uses a lot of water: farming uses roughly 70% of all the fresh water people take from rivers and lakes. That's why farmers use code and sensors to water plants only when they need it!

⌨️

Type it yourself

Don't just read it — type the example from above into the box, press Run ▶, and watch what happens. Typing it yourself is how it really sticks! Stuck? Tap Show example.

Python · Playground
Output
Press ▶ Run to see your code come to life…

Quick check

01/6
What does print(6 * 8) show?