Help me with Hopscotch math (Sine and cosine, Variables, etc)

collabs

#1

Please help me I am not good with math and would love people to help me out because this is stopping me from making cooler apps so I need some help.


#2

Cos, Sin, and Tan are stuff to do with triangles


#3

Ok, did not know that thank you


#4

I can give you a proper tutorial in a bit if you’d like


#5

Hm, I guess you’ll need help with variables because I’m not great at explaining sin and cos, and variables are more important to me. Variables are like a thing that you can change to any number depending on what you have coded for that variable. You can set a text to say he number of that variable, you can multiply and divide and add and subtract variables, and you can set parts of HSBs and RGBs to a variable. There are two kinds of variables: object variables and device (iPad) variables. I prefer iPad variables because you can use them easily in any object, but if you have a whole bunch of clones that all need their own copy of the variable, use an object variable and set he object to “Self.” I’ll give you one example of each type of variable.
iPad variable: It is a good one to use for a score counter. Say if you tap a star, you get a point, but you lose 10 points if you tap a bomb. Your code would look like this in a blank text object
When :star: is tapped
•increase (:iphone:points) by 1
When :bomb: is tapped
•increase (:iphone: points) by -10
When 7=7
•set text to (:iphone: points)

Self variable: Like I said, this works best with variables. Your code would look like this in a fading spiral draw (at least I’m pretty sure that’s where the set position block goes…), so it would be in an emoji’s code:
When :iphone: is pressed
•create a clone
When object is cloned
•set position x (last touch x) y (last touch y)
•set ((self) fade) to 0
•repeat 50 times
-increase ((self) fade) by 2
-set invisibility to ((self) fade)

Sine, cosine, and tangent are all trigonometric ratios created by the sides and angles of a right triangle. Thankfully, you don’t have to be taking trigonometry to understand them. In Hopscotch, you can use sine and cosine together in a set position block to quickly create curves (including bold text).


#6

Well, @sophia71205 did a really nice tutorial on variables. Really the only thing I can say about it is that there are different types. The ones that I have learnt are Independent and Dependent Variables. Idk I’d this would help you in coding, but it may help you understand what type of variable you need to use while coding in HS

Math Note yours truly took


Idk if this helps when coding in Hopscotch. It may help you understand variables a little bit more though


#7

That’s very applicable when making graphs.


#8

Sin and Cos can auctaully pretty cool!


#10

Doesn’t it produce a curved line when you use it to graph?


#11

What’s your hopscotch username


#12

If you need help, my sine and cosine tutorial might help. Tap on my username, scroll to the bottom, and it’s the first feature.


#13

Awesome coder 25


#14

Yeah I think that’s what Sine and Cosine is…


#15

That would be nice…


#16

Here’s a massive post I made on another topic. If you any questions whatsoever about anything, feel free to ask me or tag me!


#17

Visual Rep of how sin and cos are used to draw circles

Trig Ratios (sin, cos, tan)

image


Unit Circle

(x,y) = (cosine, sine)
image


Special Right Triangles

These lengths are what make up the unit circle
image
These in the unit circle:
image



#19

Why would you be dividing opposite/hypotenuse and so on? What are you getting from doing that, that’s important?

(excuse my lack of understanding)


#20

Are you learning trigonometry yet? You can search online to know more.


#21

What’s trigonometry


#22

Ok I wil search online