Write a Python program which accepts the radius of a circle from the user and compute the area


Introduction

Write a Python program which accepts the radius of a circle from the user and compute the area. I have used python 3.7 compiler for debugging purpose.


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. from math import pi
  2. radius = float(input ("Input the radius of the circle : "))
  3. print ("The area of the circle with radius " + str(radius) + " is: " + str(pi * radius**2))

Result

python language techstudy.org

     





Related Topics




Popular Posts