Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- phrase = input("Enter any phrase: ").lower()
- phrase = phrase.replace('camaro', 'Mustang')
- searchterm = input('What do you want to search for? ').lower()
- x = phrase.count(searchterm)
- phrase = phrase.capitalize()
- if x==1:
- word = 'time'
- else:
- word = 'times'
- print(f'The word \'{searchterm}\' appears {x} {word} in the phrase, \'{phrase}\'.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement