Computer Science, asked by mnakum940, 6 months ago

Word ='banana'
Count=0
For letter in word:
If letter =='a':
Count =count +1
Print(count)

Output
3




Take this code and put it in a funtion named count, and make it so that the funtion accepts the string and the letter as arguments.


Then rewrite the function so that instead of traversing the string, it uses the three parameter version of find from the previous assignment.​

Answers

Answered by shia07
4

Explanation:

Take this code and put it in a funtion named count, and make it so that the funtion accepts the string and the letter as arguments.

Then rewrite the function so that instead of traversing the string, it uses the three parameter version of find from the previous assignment

Similar questions