Skip to content · ⁨Saltar al contenido⁩

The Math Class · ⁨La Clase de Matemáticas⁩

Handout · ⁨Material⁩ Watch lesson · ⁨Ver lección⁩

Trace a random range at both ends

  • Tickets need integer labels from 4 through 9 inclusive. Use (int)(Math.random() * 6) + 4.
  • Scaling gives values from 0 up to but not including 6; truncating gives 0 through 5; shifting gives 4 through 9.
Trace a random range at both ends

Handout · ⁨Material⁩

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP