Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def truthy_or_falsy(value):
- if (type(value)) == int:
- if value < 0:
- return " the value " + str(value) + " is Truthy "
- elif value > 0:
- return " The value " + str(value) + " is Truthy "
- elif value == 0:
- return " The value " + str(value) + " is Falsy "
- else:
- return " The value " + str(value) + " is Falsy "
- elif (type(value)) == str:
- if value == "":
- return " The value " + value + " is Falsy "
- elif value != "":
- return " The value " + value + " is Truthy "
- else:
- return " The value " + value + " is Truthy "
- else:
- return
- print(truthy_or_falsy(0))
Add Comment
Please, Sign In to add comment