Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Prep Problem - 13 In this problem, you should write one function named count_characters. This function should accept three parameter variables. You can assume that

image text in transcribed

Prep Problem - 13 In this problem, you should write one function named count_characters. This function should accept three parameter variables. You can assume that all three will be strings. You can assume that the first will be a string with zero to many characters, and the second two will both be single-character strings. The function should count how many times the second and third parameters (characters) appear within the first parameter string. Several examples are shown below: For the three parameters 'one fish two fish', 'F' and 'o', the function should print out: 'f' and 'o' appeared 4 times in the string 'one fish two fish For the three parameters 'the deep blue sea'l 'e' and 'b') the function should print out: 'e' and 'b' appeared 6 times in the string 'the deep blue sea' You may call the functions in your code in order to test. However, you should remove all calls to the function before you submit to gradescope. The gradescope tests will call the functions to test them. Name the program prep13.py. Make sure that gradescope gives you the points for passing the test case

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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