Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 words into a tuple and find all the repeated words in the tuple 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 200 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started