Write a python program that includes the following: •

Write a python program that includes the following:

  • count(): function that takes a string as a parameter, and returns a dictionary where the keys are the unique letters in the string, and the values are the counts. Note: spaces should not be included in the dictionary. 

• find_ch_most(): function that takes a dictionary as a parameter and returns the character in the dictionary with the highest count. • Write a script that inputs a sentence from the user and using the functions above displays the character with the highest count.

Sample Run: Enter a sentence:hello how are you today? Character “o”has occurred the most in “hello how are you today? ”

 

Leave a Comment

Your email address will not be published. Required fields are marked *

GradeEssays.com
We are GradeEssays.com, the best college essay writing service. We offer educational and research assistance to assist our customers in managing their academic work. At GradeEssays.com, we promise quality and 100% original essays written from scratch.
Contact Us

Enjoy 24/7 customer support for any queries or concerns you have.

Phone: +1 213 3772458

Email: support@gradeessays.com

© 2024 - GradeEssays.com. All rights reserved.

WE HAVE A GIFT FOR YOU!

15% OFF 🎁

Get 15% OFF on your order with us

Scroll to Top