subject
Computers and Technology, 05.03.2021 16:40 swilks

14 The area of a circle is calculated using the formula ni x 12 where it is equal to 3.142 and r is the
radius.
A program is written to allow a user to enter the radius of a circle as a whole number between
1 and 30, then calculate and output the area of the circle.
01 radius = 0
02 area = 0.0
03 radius = input("Enter radius")
04 if radius <1 OR radius > 30 then
05 print("Sorry, that radius is invalid")
06 else
07 area = 3.142* (radius ^2)
08 print (area
09 endir
(a) Explain, using examples from the program, two ways to improve the maintainability of the
program. De
(4 Points)

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:00, LuvIsRage2
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
image
Computers and Technology, 23.06.2019 19:30, wilkinsonei4069
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a, b] se pot scrie ca produs de două numere prime? “.
Answers: 1
image
Computers and Technology, 24.06.2019 15:00, mbede002
Who introduced the concept of combining artificial and natural light in the studio
Answers: 1
image
Computers and Technology, 24.06.2019 23:00, Jennifer312332
Hypertension occurs when blood pressure is too high.
Answers: 1
You know the right answer?
14 The area of a circle is calculated using the formula ni x 12 where it is equal to 3.142 and r is...

Questions in other subjects:

Konu
Mathematics, 19.03.2020 16:21