Check Yourself


#1

I'm just wondering why you don't need the "return" function in this scenario of if/else statements whereas before we seemed to use return True or False for every if/else statement.

print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a word:")
if len(original) > 0:
print original
return True
else:
print "empty"
return True


#2

Is there a reason why they would be needed?
What purpose would return have in your code?
What does return do?
What is a function?
Is return a function?


#3

A post was split to a new topic: Plz help


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.