Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

WHAT IS HRM?

Answered: 1 week ago

Question

(a+2)=81 then a=?

Answered: 1 week ago

Question

GENERAL MANAGEMENT IN BUSINESS?

Answered: 1 week ago