Python Programming Tasks
1. Word Frequency Counter Write a program to count word
frequencies in a given text.
text = input("Enter text: ")
words = [Link]()
freq = {}
for word in words:
word = [Link]()
freq[word] = [Link](word, 0) + 1
print("Word Frequencies:")
for word, count in [Link]():
print(f"{word}: {count}")
2. Palindrome Checker Write a program that checks if a given
word is a palindrome.
word = input("Enter a word: ")
if [Link]() == [Link]()[::-1]:
print("Palindrome")
else:
print("Not a palindrome")
3. List Manipulation Create a list of numbers, then print the square
of each number.
numbers = [1, 2, 3, 4, 5]
squares = [n**2 for n in numbers]
print("Squares:", squares)