1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leno4ka [110]
3 years ago
13

Suppose that a text file contains an unspecified number of English words separated by blank spaces. Write a program that prompts

the user to enter the file name, reads the words from the file, and displays the words in alphabetical order. For example, for a file that contains
"ask not what your country can do for you ask what you can do for your country"

your program should output

ask
can
country
do
for
not
what
you
your
Computers and Technology
1 answer:
Nonamiya [84]3 years ago
7 0

In python 3.8:

f = open(input("Enter the name of your file (with the extension): "), "r")

l = sorted(set(f.read().split()))

for x in l:

   print(x)

If your text file was named TextDocument, you would have to enter: TextDocument.txt

You might be interested in
Which of the following is a subsystem of computers providing access to the Internet and offering multimedia and linking capabili
lbvjy [14]
Answer is option C that is w.w.w.
6 0
3 years ago
Use the drop-down menus to complete the statements about using column breaks in word 2016
Naily [24]

Answer: Breaks in the word 2016 what do you mean

Explanation:

7 0
3 years ago
Read 2 more answers
Which feature of vitualization helps increase the IT productivity of a business?
laila [671]
A the answer is yes
7 0
3 years ago
Which of the following will track every single connection outside the Web by IP address and URL? Clipper Chip National Security
astraxan [27]

The answer is proxy server

A proxy server acts as an immediate or a gateway between you, the proxy client (example, the browser) and the internet or the destination website that you want to visit. Proxy servers are designed to re-route traffic and obscure source and destination. For instance, if you want to request a page like brainly, a proxy server will be able to retrieve this page for you by providing only its IP address to the site and act as a mediator between clients and the requested server. This however, does not mean that there is no link between you and this website. It means that all the information along with the requests you made will be collected by the proxy server.

4 0
3 years ago
Read 2 more answers
What are the four conditions to help determine whether a website is a good source for information?
Ratling [72]

Answer:

1. Credible Websites are Registered with Legitimate Institutions 2. Watch out for Dummy Content for Website Credibility Check 3. Watch out for Scam Advertisements to Verify Website Credibility 4. Professional Designs Mean Everything

Explanation:

3 0
2 years ago
Other questions:
  • By default, windows does not display ____________________ in windows explorer.
    8·1 answer
  • (50 points) Write a program arrays1.cthat checks if two integer arrays are different by one and only one elementwhen compared el
    5·1 answer
  • 30
    5·1 answer
  • You are holding a rock tied to a string, which is an example of a pendulum. identify and explain the proper term for each part o
    10·2 answers
  • What are two constraints that continuous-media files have that conventional data files generally do not have?
    12·1 answer
  • Employees at the Red Bluff Golf Club & Pro Shop have the opportunity to become certified trainers if they log enough hours.
    13·1 answer
  • A client calls to complain that his computer starts up, but crashes when Windows starts to load. After a brief set of questions,
    13·1 answer
  • A(n) ________ cloud does not free an organization from the issues associated with managing the cloud infrastructure, but it does
    7·1 answer
  • a) pencil b) ink bottle c) polygon d) eye 3. Under which of the following can an operating system be classified? b) software c)
    8·1 answer
  • Which statement best explains the way that similar apps are used in different devices?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!