Advertisement
rdhammack

Reversed User Input with Python

Feb 14th, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. #Reversed User Message
  2. #
  3. #Dustin Hammack
  4. #Feb. 14, 2017
  5.  
  6. #This program will take input from the user
  7. #and will print the user message in reverse.
  8.  
  9. #tell the user what the game does
  10. print('\n\n\tHere you will enter a message for me and')
  11. print('\tI will print the message to you in reverse.')
  12.      
  13. #take in the message to reverse
  14. print('\n\n\t\tWhat would you like to say to me? ')
  15.  
  16. message = input('\n\t')
  17.  
  18.  
  19. #reversing the message
  20. print('\n\t\tYour message in reverse is: ')
  21. reverse = message[::-1]
  22.  
  23. print('\n\t' , reverse)
  24.  
  25. #end the game
  26. print(input('\nTo quit, press Enter'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement