File size: 194 Bytes
2271a07
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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)