How do I use these?

hopscotch

#1

What are all of these-


-And how do I use them? What are they for? What can I use them for?


#2

Although I only know two of those, they're used for mathematical operations.
You can make super cool things with these!
Modulo, I know (but not well) is sort of like:
"For every 5 donuts you eat, you grow by 10 percent."
Absolute Value looks like two bars outside a number, like I9I sort of.
It makes the number positive, or in more mathematical terms, it makes it the opposite.
The absolute value of 0 is 0.
Round is rounding a number, you should probably know this one unless you're in Kindergarten or First Grade. For instance, rounding 101 to the nearest 100th's place is 101. :slight_smile:
The rest, you can ask someone who has more experience. I've never actually used any of these before.


#3

I know how to use some of them. Me and @KVJ we're making a math tutorial (that we never finished) I will get to it hold on...


#4

Here are some block tutorials! Sorry, I don't know how to use inverse sin and cosine or tangent.

Sin/Cosine

You usually use it in a Set Position block, putting one in the X and one in the Y. Then you choose how wide and tall you want the arc and where it will be. The first blank in each block will be how wide (for X) or tall (for Y) the circle/oval will be. The second block is where the object will be, on the circumference of the arc. Usually you use a value here and make the value change, so that the object goes around the circle. Last is the centre. This is basically the X and Y position of the centre of the circle. The arc will form around this point. So, if you want a circle in the middle of the screen, you'd use half of the length of the device for the X, and half of the height for the Y.

Modulo

Modulo is a very unused block but it can be very important for math equations. Basically it is the remainder of a division problem.
How it Works
Modulo is set up like this:
___ % ___
This means ___ divided by ___. Modulo isn't the answer to a division problem, it is the remainder of the division problem. For example:

6 divided by 4 is 1, with a remainder of 2. So 2 would be the outcome of your Modulo.
It would look like this: 6 % 4
Another example:
6 % 2
A lot of the time there is no remainder, so the outcome would be 0 because 6 divided by 2 is 3, with no remainder.
6 % 2 = 0

Absolute Value

Absolute value is pretty simple. It is the distance from 0. For example, if you put in 5 for absolute value, the answer will be 5 because 5 is 5 away from 0. If it was -5 then the answer would be 5 because it is still 5 away from 0. Absolute value can never be a negative number.

Random

The Random block is a block that can give a random number when you need one. No wonder it's called Random!

How does this work?

First you put the block somewhere. This is a very useful block so you can use it pretty much anywhere. As a colour (like in a HSB/RGB block), as Movement (Move Forward, Set Position, Turn etc), or for Values and more!
When you add the block, you will have two blanks. It will look like: Random () to (). The first blank will be the minimum (lowest) you want. Like for Set Invisibility, the minimum might be 0, so you'd put 0 on the first blank like this: Random (0) to (_). The second blank is the maximum (highest) amount. You might put a 100 here.
So what does this do? The program will run and when it gets to the Random block, it will generate a number (randomly) which is between the two numbers you put in!

What can you use this for?
Many things: movement, positioning an object, setting an invisibility, waiting an unpredictable amount of time, set a value to something random, and more!

Power

Power is basically multipliying a number by a number. Power is set up like this: __ ^ __

Let's say that your first blank is 5 and your second blank is 2. This would be: 5^2
That doesn't mean 5 times 2. It actually means 5 times 5. How this works is you multiply your first number the amount of times as your second number.

Another example:
3^3
Not 3 times 3. This is 3 to the third power. You multiply the by the second number, which is also 3.
(• = multiply)
3 • 3 • 3 = 27


#5

@Madi_Hopscotch_ what's the use of absolute value on hopscotch? If I used it with values and wanted to make the absolute value can't I just set it?


#6

What do you mean, more specifically?


#7

Basically I don't get why anybody would use absolute value.

It's easily replaceable


#8

I use it a lot! It can be very helpful. For example, let's say your value is -100. This value is named Hello. You want to change it be be the opposite, which is 100. You would use "absolute value of Hello"


#9

But couldn't you use set value instead?


#10

If it was a changing value, then you couldn't.

Let's say you have your value going up 1 a second. Then you wouldn't be able to set it because it is changing.


#11

Ohh ok

I get it now!


#12

Yes It can be confusing. I couldn't figure out why I would need it until recently. It can be really helpful. I am actually using it in a project I am working on right now!


#13

Thank you so much for explaining Sine/Cosine!!!


#14

That was @KVJ! :stuck_out_tongue_winking_eye:


#15

Then thank you @kvj!!!


#16

Youre more than welcome!


#17

I know the first 4 are to do with trigonometry (and so are sine and cosine). The inverse means opposite to. I'm not sure about the others though.


#18

Inverse sin cancels out sine and so on. It can be used to find angles in a right triangle.