Write a program that generates a random number between 0 and 25 representing the radius of a circle. Use that number to print out the area. Keep executing until the user says they want to quit for python
Answers
Answered by
0
Please remove the '_' between rand and int while executing the program,
as brainly was not letting me submit the answer without it
Answer:
import random
import math
radius = random.rand_int(0, 25)
ans = 'yes'
while ans == 'yes':
radius = random.rand_int(0, 25)
area = math.pi * radius**2
print('The area of the circle with radius', radius, 'is', area)
ans = input('Do you wish to continue? yes/no ')
Similar questions
Math,
5 months ago
Social Sciences,
5 months ago
India Languages,
11 months ago
Science,
1 year ago
Math,
1 year ago