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
Helen [10]
3 years ago
10

Write a program that receives a filename as user input. The file is structured as multiple lines containing numbers separated by

a single space. For example, this would be an acceptable file:
Computers and Technology
1 answer:
Aliun [14]3 years ago
5 0

Answer:

The solution in Python is as follows:

filename = input("File: ")

fll = open(filename, "r")

for line in fll:

for i in line.split():

 print(i,end='\t')

print()

Explanation:

The complete question implies that the program reads a file and displays the file content in a structured way (tabs or spaces)

The explanation is as follows:

This gets input for the file name

filename = input("File: ")

This opens the file for read operation

fll = open(filename, "r")

This iterates through the lines of the file

for line in fll:

This iterates through each line (splitted by space)

for i in line.split():

This prints the current element followed by a tab

 print(i,end='\t')

This starts printing on another line

print()

You might be interested in
Please choose the correct answer please tell fast​
pav-90 [236]

Answer:

the answer might be 2......

7 0
3 years ago
Which input and output pair is correct for a bicycle?
mrs_skeptik [129]

Answer:

I'm pretty sure its B.

Explanation:

Input: Force is applied to the pedals by the rider's feet then..

Process: the chain and gear system convert the energy to cause...

Output: the rear wheels to turn and make the bike go foward

6 0
3 years ago
4 types of system software
Elina [12.6K]
Operating systems.
Device drivers.
Middleware.
Utility software.
8 0
3 years ago
Read 2 more answers
How is peace circulated?​
Agata [3.3K]

Answer:

Peace is when people are able to resolve their conflicts without violence and can work together to improve the quality of their lives. 

6 0
3 years ago
Read 2 more answers
Describe the conceptual design.
drek231 [11]

Answer:

Conceptual design is the first stage that involves defining a concept.

Explanation:

In the conceptual design phase it is important to understand the needs, doing research and find out how to meet them defining models and plans. In this stage, you have to define the steps you will need to take to develop the design and identify the challenges you may face in order to be prepare.

7 0
3 years ago
Read 2 more answers
Other questions:
  • What are pixels that are the exact same between multiple frames called?
    15·1 answer
  • In databases and database-related software, which choice is not a Boolean operator?
    7·2 answers
  • Mica's creating his web page with a software that is free of charge for the first month. If he likes the program, he will have t
    8·2 answers
  • Smart art and shapes are useful tools because they allow you to
    6·1 answer
  • Which of the following is NOT something you can specify in the bullets and numbering dialog box?
    8·1 answer
  • Help me on this question
    14·1 answer
  • E-mail messages, instant messages (IMs), or text messages sent and/or received within an organization a. are not included on a r
    9·1 answer
  • Why was the tesla model s help change the was we see EV
    12·1 answer
  • How does one build social capital?
    8·1 answer
  • you want to be able to restrict values allowed in a cell and need to create a drop-down list of values from which users can choo
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!