Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python without using loops CS103 - Lab 4 Page 3 of 4 Exercise 4 (graded) Write a function lettercount that receives two string s1

In python without using loops image text in transcribed
CS103 - Lab 4 Page 3 of 4 Exercise 4 (graded) Write a function "lettercount" that receives two string s1 and s2. The first string (sl) is a full sentence and the second string(s2) is a word. The function checks the sentence(sl) for each letter in the word(s2). For each letter in the word, it prints out the frequency of occurrence of that letter in the sentence. Sample Input a1: "do you want to go to the movies tonight" s2: qwerty Expected Output q 0 w 1 e 2 r 0 t 6 y 1 Exercise 5 (graded)

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

Recommended Textbook for

More Books

Students also viewed these Databases questions