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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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        439.823      15393.80
  59.0        370.708      10935.88
  52.0        326.726       8494.47
  86.0        540.354      23235.82
  41.0        257.611       5281.02
  75.0        471.239      17671.46
  41.0        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 439.823 15393.80 59.0 370.708 10935.88 52.0 326.726 8494.47 86.0 540.354 23235.82 41.0 257.611 5281.02 75.0 471.239 17671.46 41.0 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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education