Return Statement
return 陳述句
def whichArea(area):
if area == 'Taiwan':
return area + '! , we are from same area.'
else:
return area + ', I am from Taiwan.'
print('Hi, my name is Jason. I am from Taiwan.')
print('Where are you from?')
userInput = input()
response = whichArea(userInput)
print(response)
print('Nice to meet you~')
None
利用return中斷函式
Last updated