DAY 4 🚀 #30daysofcoding PYTHON Q : WORD COUNT Write a program that reads a sentence S and prints the frequency of each word in the given sentence. Note.. 📒 If the given sentence S is Hello world Hello, * The frequency of Hello in the given sentence is twice. * The frequency of world in the given sentence. Input 👈 ------ The input will be a single line containing a string representing a sentence 'S'. Output 👈 ------- The output should be multiple lines with each line containing a word and its frequency in the given sentence seperated by colon-character ( : ) with the order of appearance in the given sentence. #python #ccbp #nxtwave #30daysoflearning

To view or add a comment, sign in

Explore content categories