Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # define the shut_down function
- def shut_down(s):
- if s == 'yes':
- return 'Shutting down'
- elif s == 'no':
- return 'Shutdown aborted'
- else:
- return 'Sorry'
- # testing
- print shut_down('yes') # will return 'Shutting down'
- print shut_down('no') # will return 'Shutdown aborted'
- print shut_down('foo') # will return 'Sorry'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement