program5_2.py Write a program that prints a 3-column table showing the circumference and area of ten circles of a specified random radius. See Sample Output. The area and circumference are calculated and printed by a custom function that takes a radius as its only argument. The low and high values for the range of random radii are specified by user inputs in main. The main function should then use these high and low values and the random module in a loop to generate random integers and execute the custom function with the random integers as radii. In the table, the radius column should be 6 charas. wide with 1 decimal, the circumference column should be 12 charas. wide with 3 decimals, and the area column should be 11 characters. wide with 2 decimals. Sample Output Enter a low integer for the random radii 30 Enter a high integer for the random radii 90 AREA 17671.46 RADIUS CIRCUMFERENCE 75.0 471.239 70.0 439.823 15393.80 59.0 370.708 10935.88 8494.87 23235.22 5281.02 52.0 326.726 86.0 540.354 41.0 257.611 75.0 471.239 17671.46 41.0 257.611 5281.02 85.0 534.071 22698.01 69.0 433.540 14957.12

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.1: Function And Parameter Declarations
Problem 10E
icon
Related questions
Question
Using Python
program5_2.py
Write a program that prints a 3-column table showing the circumference
and area of ten circles of a specified random radius. See Sample Output.
The area and circumference are calculated and printed by a custom
function that takes a radius as its only argument. The low and high values
for the range of random radii are specified by user inputs in main. The
main function should then use these high and low values and the random
module in a loop to generate random integers and execute the custom
function with the random integers as radii. In the table, the radius column
should be 6 charas. wide with 1 decimal, the circumference column
should be 12 charas. wide with 3 decimals, and the area column should
be 11 characters. wide with 2 decimals.
Sample Output
Enter a low integer for the random radii 30
Enter a high integer for the random radii 90
RADIUS
CIRCUMFERENCE
AREA
75.0
471.239
17671.46
70.0
59.0
52.0
439.823
15393.80
370.708
326.726
540.354
10935.88
8494.87
86.0
23235.22
41.0
257.611
5281.02
75.0
41.0
471.239
17671.46
257.611
5281.02
85.0
534.071
22698.01
69.0
433.540
14957.12
Transcribed Image Text:program5_2.py Write a program that prints a 3-column table showing the circumference and area of ten circles of a specified random radius. See Sample Output. The area and circumference are calculated and printed by a custom function that takes a radius as its only argument. The low and high values for the range of random radii are specified by user inputs in main. The main function should then use these high and low values and the random module in a loop to generate random integers and execute the custom function with the random integers as radii. In the table, the radius column should be 6 charas. wide with 1 decimal, the circumference column should be 12 charas. wide with 3 decimals, and the area column should be 11 characters. wide with 2 decimals. Sample Output Enter a low integer for the random radii 30 Enter a high integer for the random radii 90 RADIUS CIRCUMFERENCE AREA 75.0 471.239 17671.46 70.0 59.0 52.0 439.823 15393.80 370.708 326.726 540.354 10935.88 8494.87 86.0 23235.22 41.0 257.611 5281.02 75.0 41.0 471.239 17671.46 257.611 5281.02 85.0 534.071 22698.01 69.0 433.540 14957.12
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Troubleshooting
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr