Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a python function called myFind which accepts 2 parameters ( tmp --a string and strToLocate --a string or single character). It should return the
Write a python function called myFind which accepts 2 parameters ( tmp --a string and strToLocate --a string or single character). It should return the POSITION (an integer) of the first occurrence of strToLocate in tmp. If it isnt present, it should return -1. DO NOT use Pythons find methods.
Example: result = myFind( This is missing, is); print(result) #output is 2
Example: result = myFind( This is missing, not); print(result) #output is -1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started