curriculum/challenges/english/blocks/learn-encapsulation-by-building-a-projectile-trajectory-calculator/65f569725359e10d345bc52a.md
You are going to build a program that calculates and draws the trajectory of a projectile given the angle, speed and height of the throw.
Start by importing math, you will use it a lot in this project as it has useful methods like math.radians, math.cos, math.sin and others.
Also create these variables to have the value of the gravitational acceleration and some special symbols that will be useful later (use copy and paste for these).
GRAVITATIONAL_ACCELERATION = 9.81
PROJECTILE = "∙"
x_axis_tick = "T"
y_axis_tick = "⊣"
Use import math to import the math module.
({test: () => assert(runPython(`_Node(_code).has_import('import math')`))})
You should have a GRAVITATIONAL_ACCELERATION variable with value of 9.81.
({test: () => runPython(`
assert _Node(_code).has_variable("GRAVITATIONAL_ACCELERATION"), "missing variable"
assert _Node(_code).find_variable("GRAVITATIONAL_ACCELERATION").is_equivalent('GRAVITATIONAL_ACCELERATION = 9.81'), "variable has wrong value"
`)})
You should have a PROJECTILE variable with value of "∙".
({test: () => runPython(`
assert _Node(_code).has_variable("PROJECTILE"), "missing variable"
assert _Node(_code).find_variable("PROJECTILE").is_equivalent('PROJECTILE = "∙"'), "variable has wrong value"
`)})
You should have a x_axis_tick variable with value of "T".
({test: () => runPython(`
assert _Node(_code).has_variable("x_axis_tick"), "missing variable"
assert _Node(_code).find_variable("x_axis_tick").is_equivalent('x_axis_tick = "T"'), "variable has wrong value"
`)})
You should have a y_axis_tick variable with value of "⊣".
({test: () => runPython(`
assert _Node(_code).has_variable("y_axis_tick"), "missing variable"
assert _Node(_code).find_variable("y_axis_tick").is_equivalent('y_axis_tick = "⊣"'), "variable has wrong value"
`)})
--fcc-editable-region--
--fcc-editable-region--