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
Suppose that we want to enhance the processor used for Web serving. The new processor is 10 times faster on computation in the W
elena55 [62]

Answer:

The overall speedup gained by incorporating the enhancement is 1.563

Explanation:

Using Amdahl's Law;

The overall speedup  (N) =\dfrac{1}{(1-P) + ( \dfrac{P}{n})}

where;

P = Fraction Enhanced for Old Processor

n = speedup enhancement as a result of the new processor

P = 40% = 0.40  and n = 10

∴

The overall speedup (N) is:

=\dfrac{1}{(1-0.4) + ( \dfrac{0.4}{10})}

=\dfrac{1}{(0.6) + ( 0.04)}

=\dfrac{1}{0.64}

= 1.563

Thus, the overall speedup gained by incorporating the enhancement is 1.563

3 0
3 years ago
Write a program to help a local restaurant automate its breakfast billing system. The program should do the following:
Maurinko [17]

Answer:

Please find the code and its output in the attached file:

Explanation:

In this code a structure "menuItemType" is defined that declared float and integer variable and outside the structure its list type variable "menuList" is defined that holds and calculates its value.

In the next step, a class "Rest" is defined, and inside the class a method "getData", "showMenu", and "printCheck" is defined, in which the above methods uses the switch for input and calculate the value and the last "printCheck" calculates the Tax and Amount Due value.

In the main method, a class object is created that prints message and call the above method.

6 0
3 years ago
_______________, such as BASIC, Python, Java, Prolog, and C , make the programming process easier by replacing unintelligible st
musickatia [10]

Answer:

High level Languages

Explanation:

High level languages are made so that the byte code, Assembly code that computers can understand should be converted into a higher level human understandable languages such as Python,C++. Also, remember that the compilers of these languages such as Visual studio ultimately converts the high level code into low level code ( Assembly code ) that computers can understand.

8 0
3 years ago
A research study does not need to be well designed to be effective.<br> False<br> O True
Sedbober [7]
Answer:

true

Remember to drink water!!
7 0
3 years ago
____________ is using digital media safely, responsibly, and ethically.
Ronch [10]

I think it may digital citizenship

8 0
4 years ago
Read 2 more answers
Other questions:
  • I NEED HELP PLEASE ITS TIMED
    9·1 answer
  • In a certain computation, 90% of the work is vectorizable. Of the remaining 10%, half is parallelizable for an MIMD machine. Wha
    9·1 answer
  • Define function multiply(), and within the function: Get user input() of two strings made of whole numbers Cast the input to int
    11·1 answer
  • What layout manager should you use so that every component occupies the same size in the container?
    5·1 answer
  • "The ______ of an operational system that supports an organization includes policies, requirements, and conditional statements t
    13·1 answer
  • What is suitable equipment to meet customer needs from
    10·1 answer
  • Please help I’ll mark brainliest!
    12·2 answers
  • Which key combination should you use
    9·2 answers
  • Select the correct answer from each drop-down menu,
    9·1 answer
  • PLS HELP I GOT 30 MINS TO TURN THIS IN!!!
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!