So I've examined my educational material, I've perused the python
documentation and for the life of me I can't figure out why return doesn't
print a result in the IDE. I use print, the program acts as expected. What
am I missing?
import math
from decimal import Decimal
def findHypot(a, b):
c = math.sqrt((a ** 2) + (b ** 2))
if c == (round(c)):
return round(c)
else:
return round(c, 4)
findHypot(3, 4)
from the IDE:
===== RESTART: C:\Users\Roger\Documents\GitHub\LaunchCode\hypotenuse.py
=====
>>>
Thank you as always.
--
Roger Lea Scherer
623.255.7719
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor