Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+2. How could any of these nonverbal elements be made stronger?

Answered: 1 week ago