Spaces:
Sleeping
Sleeping
| import math | |
| # Get diameter from user | |
| d = float(input("Enter the diameter: ")) | |
| # Calculate the area | |
| area = 0.25 * math.pi * (d**2) | |
| # Print the result | |
| print("The area of the circle is:", area) | |