Welcome to Itch!
This is your playground for learning to code! Lets go over some basic concepts and tools you can use in your code! 😀
The "Write" Tool
Lets make your first program! Select the green box and type:
write Hello World!
The "Play" Button
Click to run your code. If you click the "play" button in the bottom right green box it will execute the code you have written in the green box then show the results in the Output Box.
Error Messages
Imagine you have a robot friend 🤖, and you give it instructions to do something fun, like drawing a picture. You give the robot all the steps, but sometimes you make mistakes in your instructions, like telling the robot to use a purple marker when it doesn't have one. When your robot tries to follow your instructions and encounters a mistake, it gets stuck and doesn't know what to do next.
The "Is" Tool and Variables
A variable is like a box 📦 that stores or hold a number or word(s). To store a variable we simply type a name for a variable and then type "is" to give the variable a word or number it holds. We could store our favorite color in a variable named favoriteColor. Here is an example of what you could type:
favoriteColor is Blue
cookies is 12
The "Ask" Tool
The ask 🧐 tool asks you or whoever is using your code a question to answer. The ask tool works well with variables as you can store the answer in a variable. To use the ask tool simply type "ask" then type a question.
The "Random" Tool
The "random" 🎲 tool is used to get a random number between two numbers you specify. For example, you could write: "random 1 10" and the code would randomly give you any number between 1 and 10 including 1 and 10.
The "If" Tool
The If
🤷♂️ tool checks to see if something you have written is True. To use the if we tool we simply type if then a statement we want it to check. After we right that if we want the code to do something afterwards we have to hit the "Tab" on the next line. A good example is
if 5 = 5
write This math is correct!
Math
In Itch we can also do basic math like addition (+), subtraction (-), multiplication (*), division (/) 🤓. To do this we simply put one of the operator symbols in between two numbers. Try typing:
write 2 + 2
The "Comments" Tool
Think of code comments like writing little sticky note 📑 messages in your favorite book. These messages help you understand the story better, just like how code comments help us understand how a computer program works. They're like secret hints 🤫 for humans, and the computer just ignores them. So, when you write code comments, you're adding helpful notes to make the code easier to read and follow, just like reading a fun story with notes to help you enjoy it more!