Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Here is the sample text Summer is over and the hot days are gone Bushes shrubs and trees are parched The grass is brown and
Here is the sample text
Summer is over and the hot days are gone Bushes shrubs and trees are parched The grass is brown and everything waits for rain It has been dry for half a year Last spring, a Tortoise mother carefully prepared the nest for her five eggs After closing and concealing the hole her duties were ended and she left Now it is autumn the Tortoise eggs are fully developed and ready to hatch
Please select Python
Write a program that prompts the user to enter a filename and prints a list of all the words in the file converted to lowercase, then sorted into alphabetical order. Note: the file may include duplicate words. If the file contains the same word more than once, however, it must only appear in the list ONCE. You can assume that the file is a plain text file without any punctuation marks. Click here to download a sample text file. For example: Input Result test1.txt Enter filename: test1.txt ['a', 'file', 'line', 'one', 'only', 'simple', 'with']
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