Why isn't this working?
19:19 pdf.pdf (26.7 KB)
Could you post your code rather than creating a pdf?
if type(num) == int: return abs(num) elif type(num) == float: return abs(num) else: return "Nope"
@cduplantier You are asking the function to return the type of num which is unnecessayr. If you take out that bit of code:
then it should work. Otherwise use mine:
def distance_from_zero(number): if type(number) == int or type(number) == float: return abs(number) else: return "Nope"
Let me know if you need more help after that. Hope it works!
Thanks! That worked!
good you know
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.