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
weeeeeb [17]
3 years ago
13

Write a program that reads the input.txt file character by character and writes the content of the input file to output.txt with

capitalize each word (it means upper case the first letter of a word and lowercase remaining letters of the word)
Computers and Technology
1 answer:
gizmo_the_mogwai [7]3 years ago
5 0

Answer:

def case_convertfile( file_name):

    with open(" new_file","x") as file:

         file.close( )

    with open("file_name", "r") as txt_file:

     while True:

            word = txt_file.readline( )

            word_split= word.split(" ")

            for word in word_split:

                  upper_case = word.uppercase( )

                  file= open("new_file","w+")

                  file= open("new_file","a+")

                  file.write(upper_case)

     txt_file.close( )

     file.close( )

Explanation:

This python function would open an existing file with read privilege and a new file with write and append privileges read and capitalize the content of the old file and store it in the new file.

You might be interested in
An example of software is a
Veseljchak [2.6K]

Answer: false

Explanation:

5 0
2 years ago
Robots are increasingly being used in caring roles. Discuss the ethical and cultural implications of this trend
vekshin1
Using more robots means less human contact which means declining social skills, and heavier dependence on technology. And using more technology is expensive.
4 0
3 years ago
Is “Annabelle” a true story? I mean it is fiction right?
Julli [10]
Annabelle is indeed a true story making it fiction
5 0
3 years ago
Read 2 more answers
What do the last two steps in the cyclical design process most likely involve
zlopas [31]

Answer:

Well you would want to test the design, so it would be "c" then "d"

Explanation:

I hope this helps.

8 0
2 years ago
BE CAREFUL OF SCAM LINKS HERE
JulsSmile [24]

Answer:

I know what the scam links look like and to be careful. Thanks for warning us though. Have a awesome day!

Explanation:

6 0
3 years ago
Other questions:
  • What is the value of the variable phones after the execution of the following code? phones = {'John': '5555555', 'Julie' : '7777
    6·1 answer
  • Although you can use a dialog box to indent paragraphs, word provides a quicker way through the ____.
    7·1 answer
  • "The _____ of the Open Systems Interconnection (OSI) model generates the receiver’s address and ensures the integrity of message
    6·2 answers
  • Which tab should you choose to add a picture from a file to your presentation?
    8·1 answer
  • Write a program in C which asks the user for 10 integers and prints out the biggest one.
    10·1 answer
  • _____ of a global information system (GIS) concentrates on medium-range activities that move an organization toward achieving lo
    7·1 answer
  • . ------------ means that the two merging companiesbecame history and a new firm
    10·1 answer
  • E) Point out the errors( if any) and correct them:-
    14·1 answer
  • Blank Are input instructions you give to a computer
    13·1 answer
  • What is the output of the following code?<br> print (12 // 6)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!