For Beginners

Lesson 9/23

Practical Variable

Now that you know variables, make use of them in your amazing code for automatic font size changing in Notepad.

Assign font size equal to 10 to a variable named ♥fontsize:

♥fontsize = 10
program notepad
keyboard Hello⋘enter⋙world!
keyboard ⋘alt+o⋙f
window font
keyboard ⋘tab 2⋙♥fontsize⋘enter⋙

In the first line of your code you declare that the ♥fontsize variable equals 10. In the last line the value of this variable is used to define the font size.

As you can see, you can use ♥fontsize in any text generated with the keyboard command.

In the next lesson you will see how loops work.