The code has
???? for the fire power. Replace
???? with
72, then click
Run Code!
1. At $\theta = 45^\circ$, $\sin(2\theta) = \sin(90^\circ) = 1.0$.
2. With $v_0 = 3.6 \times 72 \approx 259.2\text{ px/s}$ and $g = 160\text{ px/s}^2$:
$$R = \frac{259.2^2 \times 1.0}{160} \approx \frac{67,185}{160} \approx 420\text{ px}$$
3. The shell clears the hilltops, impacts at $x = 480$, and scores a direct hit on the enemy bunker!
4. Challenge: Try
artillery_game(2) to hit an elevated cliff fortress, or
artillery_game(3) to compensate for a $-18\text{ px/s}^2$ headwind!