Increase numbers by 1 logic

   Hello all,

Welcome to Sketchware full time Tutorials. My name is Mac and today were going to learn something about number variables .

What are number variables?

•these are a type of variables that hold number values which are whole numbers (integers) and decimal values (double/float).

Fractions ½, ⅓, ¼  cannot be stored in number variables and so you need to change them to decimal values in order for them to be stored..

So let's start,

1: Name your number variable.

Give your number variable any name to guide you as you continue.

2: Create a timer component
Our timer component will help us increase numbers every second.

3: Build the logic


From oncreate..

 •For every 1 second (1000 ms ) , we increase the number variable by 1 using the "increase by 1 block" and then set this number to a textview which will display the numbers as they increase..

4: compile and see results

I hope this short tutorial has helped you in knowing number variables and how to use timer component.

This video will show you how these steps were made in creating the increase by 1 logic from scratch.

No comments:

Note: Only a member of this blog may post a comment.

Powered by Blogger.