Skip to content

Commit 704f273

Browse files
committed
Add "Circle Caluclator" example
Signed-off-by: Ercan Ersoy <ercanersoy@ercanersoy.net>
1 parent dc12539 commit 704f273

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Copyright (c) 2020 Ercan Ersoy
77
## Examples List
88

99
* [Hello World](hello-world)
10-
* [User Input](user-input)
10+
* [User Input](user-input)
11+
* [Circle Calculator](circle-calculator)
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pi = 3.14
2+
3+
radius = int(input("Radius of circle: "))
4+
5+
circumference = radius * 2 * pi
6+
area = pow(radius, 2) * pi
7+
8+
print("Circumference: ", end="")
9+
print(circumference)
10+
11+
print("Area: ", end="")
12+
print(area)

0 commit comments

Comments
 (0)