Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Define a new function ringRadius(diameter, numberOfRings, ringNumber) to determi

ID: 3931381 • Letter: D

Question

Define a new function ringRadius(diameter, numberOfRings, ringNumber) to determine the radius of each ring, which will be based on the radius of the outer ring and what ring number it is. (Assuming that the rings are numbered 1…n, with 1 being the innermost ring, and n being the outermost ring.)

For example, if there are 5 rings and the outermost ring is 15 feet in diameter. The rings will have these radii:

This is the radius of the outermost circle, divided by the number of rings, times the ring number.

Ring Number (n) Radius 1 1.5 2 3 3 4.5 4 6 5 7.5

Explanation / Answer

def ringRadius(diameter, numberOfRings, ringNumber):
   outerRadius = diameter / 2.0
   return (outerRadius / numberOfRings) * ringNumber

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote