Private: Code with Blockly
About Lesson

Till now, we have learned about data types and texts. As we advance further, you will realize that coding is mainly concerned with solving problems, some of which may be mathematical in nature. As you may have seen while solving maths questions, variables like x, y, or z make the solution easier.
Variables make the code simpler and better as you don’t need to enter the value or name time and again. For example see the following codes, which do you think is better?

As you can see, by using variables, the code becomes simpler and better. In the first code, the point where we find the length of “How are you doing?”, there is a spelling mistake. Such mistakes can give wrong outputs. By use of variables, we remove such problems.

When you will learn to code further, you may come across codes with more than 100 lines, as compared to the 3 lines in the above examples. Without variables, it becomes very hard to maintain accuracy.

error:
Fill in the form for S’O’A Fablab Orientation 2021.