<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Mcqbuddy Q&amp;A - Recent activity in Python</title>
<link>https://forum.mcqbuddy.com/index.php/activity/python</link>
<description>Powered by Question2Answer</description>
<item>
<title>Python Exercise - 1 Word Frequency Counter</title>
<link>https://forum.mcqbuddy.com/index.php/31/python-exercise-1-word-frequency-counter</link>
<description>&lt;p&gt; Python Exercise: Word Frequency Counter&lt;/p&gt;&lt;h3&gt;&lt;u&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;/u&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Write a Python program that:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;1. Takes a sentence as input from the user.&lt;/p&gt;&lt;p&gt;2. Counts how many times each word appears.&lt;/p&gt;&lt;p&gt;3. Prints the result in sorted order (alphabetically).&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Example Input&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Enter a sentence: this is a test this is good&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Expected Output&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;a: 1&lt;/p&gt;&lt;p&gt;good: 1&lt;/p&gt;&lt;p&gt;is: 2&lt;/p&gt;&lt;p&gt;test: 1&lt;/p&gt;&lt;p&gt;this: 2&lt;/p&gt;&lt;h3&gt; &lt;strong&gt;Hints&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;Convert input to lowercase.&lt;/p&gt;&lt;p&gt;Use .split() to break words.&lt;/p&gt;&lt;p&gt;Use a dictionary {} to store counts.&lt;/p&gt;&lt;p&gt;Use sorted() before printing.&lt;/p&gt;</description>
<category>Python</category>
<guid isPermaLink="true">https://forum.mcqbuddy.com/index.php/31/python-exercise-1-word-frequency-counter</guid>
<pubDate>Fri, 12 Dec 2025 00:59:04 +0000</pubDate>
</item>
</channel>
</rss>