Advertisement
Adehumble

Week2 Coding Exercise 6

Feb 8th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. #6
  2. def same_first_and_last_letter(character):
  3.     while character=="":
  4.         print("You must provide an input. Please, try again!")
  5.         break
  6.     if character[0]==character[-1]:
  7.         print(True)
  8.     else:
  9.         print(False)
  10.  
  11. print("\tHello! Dear User. This program is written to test that the first and last characters of any word are the same. \n \tIt will return a FALSE statement if it's otherwise and if no input was supplied.")
  12. print("_______"*17)
  13. word=input("Enter any word of your choice, ")
  14. same_first_and_last_letter(word)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement