mirror of
https://github.com/venomade/calculator.git
synced 2026-11-16 18:27:39 +00:00
Add CircleArea with failing test
This commit is contained in:
1 parent
bf6cdbd999
commit
b6549523a1
2 files changed
+10
-1
No files matched your search
@@ -12,6 +12,12 @@ def multiply(a, b):
|
||||
def divide(a, b):
|
||||
return a / b
|
||||
|
||||
def CircleArea(r):
|
||||
if r >= 0:
|
||||
return 3.14 * r * r
|
||||
else:
|
||||
return "NaN"
|
||||
|
||||
def main():
|
||||
while True:
|
||||
a = float(input("First number: "))
|
||||
|
||||
Reference in new issue
Block a user