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



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.


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


Ok, did not know that thank you


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


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).


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


That’s very applicable when making graphs.


Sin and Cos can auctaully pretty cool!


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


What’s your hopscotch username


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.


Awesome coder 25


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


That would be nice…


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!


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

Trig Ratios (sin, cos, tan)


Unit Circle

(x,y) = (cosine, sine)

Special Right Triangles

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


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)


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


What’s trigonometry


Ok I wil search online