SlideShare a Scribd company logo
1 of 1
Download to read offline
...visual studio 2015ProjectsCirclesCirclesCircles.py 1
#Circles.py
# Import Modules
import math
# Define Circumference of Circle
def circumference_circle(radius):
return 2*(math.pi)*radius
# Define Area of Circle
def area_circle(radius):
return (math.pi)*(math.pow(radius,2))
# Define variables
r = 1.6
c = circumference_circle(r)
a = area_circle(r)
# Print results
print('Radius of circle is ',r, 'units')
print('Circumference of circle is ',c, 'units')
print('Area of circle is ',a, 'square units')

More Related Content

What's hot

easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)pluschen
 
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기NAVER D2
 
8.1 angle meas in polygons
8.1 angle meas in polygons8.1 angle meas in polygons
8.1 angle meas in polygonsjgbou812
 
Simulate elliptical orbit in pygame
Simulate elliptical orbit in pygameSimulate elliptical orbit in pygame
Simulate elliptical orbit in pygameDr Anurekha R
 
Simulate bouncing ball in pygame
Simulate bouncing ball in pygameSimulate bouncing ball in pygame
Simulate bouncing ball in pygameDr Anurekha R
 
All three forms (variety)
All three forms (variety)All three forms (variety)
All three forms (variety)MsKendall
 
6.14.3 Circle Equations
6.14.3 Circle Equations6.14.3 Circle Equations
6.14.3 Circle Equationssmiller5
 
Practica productos notables
Practica productos notablesPractica productos notables
Practica productos notablesLina Ari
 
7th PreAlg - L74--May4
7th PreAlg - L74--May47th PreAlg - L74--May4
7th PreAlg - L74--May4jdurst65
 
Monad and Algebraic Design in Functional Programming
Monad and Algebraic Design in Functional ProgrammingMonad and Algebraic Design in Functional Programming
Monad and Algebraic Design in Functional ProgrammingNamuk Park
 
Math arcs and sectors
Math arcs and sectorsMath arcs and sectors
Math arcs and sectorsshaminakhan
 
8th PreAlg - L74--April12
8th PreAlg - L74--April128th PreAlg - L74--April12
8th PreAlg - L74--April12jdurst65
 

What's hot (18)

easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)easy elliptic curve(椭圆曲线算法解释)
easy elliptic curve(椭圆曲线算法解释)
 
Programming meeting #8
Programming meeting #8Programming meeting #8
Programming meeting #8
 
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
[112] 모바일 환경에서 실시간 Portrait Segmentation 구현하기
 
8.1 angle meas in polygons
8.1 angle meas in polygons8.1 angle meas in polygons
8.1 angle meas in polygons
 
Simulate elliptical orbit in pygame
Simulate elliptical orbit in pygameSimulate elliptical orbit in pygame
Simulate elliptical orbit in pygame
 
Simulate bouncing ball in pygame
Simulate bouncing ball in pygameSimulate bouncing ball in pygame
Simulate bouncing ball in pygame
 
All three forms (variety)
All three forms (variety)All three forms (variety)
All three forms (variety)
 
6.14.3 Circle Equations
6.14.3 Circle Equations6.14.3 Circle Equations
6.14.3 Circle Equations
 
Practica productos notables
Practica productos notablesPractica productos notables
Practica productos notables
 
PythonArtCode
PythonArtCodePythonArtCode
PythonArtCode
 
C++
C++ C++
C++
 
7th PreAlg - L74--May4
7th PreAlg - L74--May47th PreAlg - L74--May4
7th PreAlg - L74--May4
 
Monad and Algebraic Design in Functional Programming
Monad and Algebraic Design in Functional ProgrammingMonad and Algebraic Design in Functional Programming
Monad and Algebraic Design in Functional Programming
 
Proga 0608
Proga 0608Proga 0608
Proga 0608
 
Ch14 34
Ch14 34Ch14 34
Ch14 34
 
Math arcs and sectors
Math arcs and sectorsMath arcs and sectors
Math arcs and sectors
 
2.circle
2.circle2.circle
2.circle
 
8th PreAlg - L74--April12
8th PreAlg - L74--April128th PreAlg - L74--April12
8th PreAlg - L74--April12
 

Listing for Circles

  • 1. ...visual studio 2015ProjectsCirclesCirclesCircles.py 1 #Circles.py # Import Modules import math # Define Circumference of Circle def circumference_circle(radius): return 2*(math.pi)*radius # Define Area of Circle def area_circle(radius): return (math.pi)*(math.pow(radius,2)) # Define variables r = 1.6 c = circumference_circle(r) a = area_circle(r) # Print results print('Radius of circle is ',r, 'units') print('Circumference of circle is ',c, 'units') print('Area of circle is ',a, 'square units')