Google Classroom
GeoGebraGeoGebra Klaslokaal

Random Angle

It is time to create the random angle for the question. There are several ways of doing it. The simple way is creating a slider between 0 and 180 and then hide the slider from the screen. When a slider is created, GeoGebra automatically defines a variable for it. We will use that variable to show thr angle on our construction. is the slider variable. We will later change the randomly with a button to generate new questions. A' is the rotation of A around O with degrees.
It is your turn to try.
Let's add a button to change the value of randomly. It will be the first time, we will write our command to a button. We will use two commands to achieve this:
  1. SetValue()
  2. RandomBetween()
SetValue, as the name indicates, sets a value for the variable stated. RandomBetween command produces a random number between the numbers given. Do not forget we need to generate angle, so we shouls a at the end of the number.
Your turn.