python_exercises/thinkcspy/Chapter-2-Exercises/problem8.py

11 lines
No EOL
235 B
Python

# Runestone.Academy thinkcspy course
# Chapter 2
# Problem 8
r_string = input('Enter the radius of the circle')
r = int(r_string)
pi = 3.14
area = pi * r**2
print('The approximate area of the circle with', r, 'radius is', area, '.')