Visual Algorithms Meet Motion: mBlock Practice for Bekasi Learners
Bekasi families gain from visual robotics that stays optional on hardware. Enquire WhatsApp +92 322 4217059. No invented Bekasi studio.
An mBlock STEM robotics starter course for Bekasi students lets learners write visual algorithms that control motor drives, distance sensing and light indicators—on screen first, optional hardware later.

Video coming soon
Lesson notes and Q&A below are available now. The video will appear here when published.
Type conversion (often referred to as typecasting) is the process of changing a value from one data type into another. For example:
| Conversion | Example | Result |
|---|---|---|
| String to Integer | int("34") | 34 (calculable) |
| String to Float | float("34.5") | 34.5 (decimal) |
| Number to String | str(100) | "100" (text) |
When numerical data is enclosed in quotation marks (such as "34"), Python treats it strictly as text (str). To convert a numeric string into an integer, pass the variable into the built-in int() function:
age = "34"
print(type(age))
# Output:
print(int(age) + 1)
# Output: 35
The same principle applies when converting text representations of decimals into floating-point numbers using float().
Python provides the built-in input() function to prompt the user for keyboard data:
age = input("Please write your age: ")
When this line executes, Python displays the prompt and waits until the user types a response and presses Enter.
The input() function always returns user input in string (str) format—even if the user types digits like 71 or 25:
age = input("Please write your age: ")
# User enters: 71
print(type(age))
# Output:
Because the value is stored as a string, you cannot immediately execute mathematical calculations with it.
To perform calculations on numbers collected from the user, convert the string into an integer using int():
age = input("Please write your age: ")
my_age = int(age)
print(type(my_age))
# Output:
next_year_age = my_age + 1
print("Next year you will be:", next_year_age)
Once converted, the program can execute any arithmetic operation without errors.
Type conversion is the process of converting a variable from one data type into another (for example, a string into an integer or float). It is necessary because data often arrives in a format that cannot be used in arithmetic until it is explicitly cast into a numeric type—or into a string when text-based manipulations are required.
The input() function always returns data in string (str) format, regardless of what the user types. Even whole numbers like 71 or 25 are stored as text, which you can verify with type().
Convert the string input into an integer or float before performing math:
age = input("Please write your age: ")
my_age = int(age)
print(my_age + 1)
mBlock Coding Fast Track for Beginners on Udemy.
Disclosure: This page contains affiliate links. We may earn from qualifying purchases at no extra cost to you. Links are intended for parents and educators, not as marketing directed at young children.
Bekasi families gain from visual robotics that stays optional on hardware. Enquire WhatsApp +92 322 4217059. No invented Bekasi studio.
mBlock combines the drag-and-drop simplicity of Scratch visual block programming with real hardware control. Bekasi students write visual algorithms that operate physical mBot motors, distance sensors, and LED lights in real time.
Yes! We utilize interactive software robotics simulators during online live sessions, enabling students to program and test robot movements on screen prior to purchasing physical kits.
Click the WhatsApp button on this page to connect with our admissions desk and secure a free live trial pass for this week.