1.09 Skill-builder: Area of a Circle

Apply your organizational skills

In the past few exercises, you have been learning how to organize your problem-solving into chunks. This is useful because:

Today we are going to see how the problem-solving chunking process applies to Javascript.

Saving your work

Open your editor and save the empty document as "1.09S-AreaOfACircle-LastName.html"

The assignment

  1. Enter the example code below
  2. Customize it to match your style

Extend and expand

Why not try more sophisticated formulas? For example, the volume of a cone requires you to know both the radius and the height. V=pi(r^2)h/3 Or try some other interesting multi-variable calculation, like the Drake equation, or something else interesting.

Entering numbers is good, but sometimes a slider will allow you to input a number easily from within a range.
Make a search for <input type="range"> to see how to create a range slider.