Advertisement
Adehumble

Week3 Coding Exercise 2

Feb 11th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #2
  2. def find_my_letter(string,character):
  3.     print(string.find(character))
  4.    
  5. print("Hello, dear user! Let's play a game.\nI'll help you to find the index position of any letter in any word of your choice.\nFeel free")
  6.  
  7. user_string=input("Enter any word of your choice:  ")
  8. user_character=input("Which alphabet do you wish to look for it index?   ")
  9.  
  10. find_my_letter(user_string,user_character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement