Question: Write a python program to read a atring from cmd (use quotatiom around your sentence to read the whole input as one string as shown).
2. Filename: assign3-2.PY Write a Python program to read a string from cmd(use quotation around your sentence to read the whole input as one string as shown). Put each word into a tuple and find all the repeated words and their occurrences. H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431 Module3\assign3-2.py "I felt happy because I saw the others were happy and because I knew I should feel happy but I wasn't really happy" The repeated word I has 5 occurance in the tuple The repeated word happy has 4 occurance in the tuple The repeated word because has 2 occurance in the tuple H:>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module3\assign3-2.py "I am an IT instructor a nd. I am teaching 5 courses this semester and I have around zee hundred students" The repeated word I has 3 occurance in the tuple The repeated word am has 2 occurance in the tuple The repeated word and has 2 occurance in the tuple
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
