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
Program Rock.java contains a skeleton for the game Rock, Paper, Scissors. Open it and save it to your directory. Add statements
Marta_Voda [28]

Answer:

Clarification

Explanation:

Are you asking us to do your program for you? Or do you have a specific question about coding not working?

5 0
3 years ago
__________ intelligence is an approach to boundary spanning which results from using sophisticated software to search through in
lbvjy [14]

Answer:

Business Intelligence

Explanation:

The approach uses tools to access & analyze data sets and present analytical findings in reports, summaries, dashboards, maps, charts and graphs to provide users with detailed intelligence about the state of the business.

Business intelligence uses softwares and services to convert data into actionable insights that inform an organization’s strategic and tactical business decisions.

6 0
3 years ago
What is an efficient way to ensure that the code is working as per the acceptance criteria/business requirements? (1 correct ans
seraphim [82]

Answer:

1. through automated functional tests

Explanation:

5 0
3 years ago
Read 2 more answers
Which button should be utilized if a user is unsure whether or not they are the right person to reply to an email?
Triss [41]

Answer:

its either a or c

Explanation:

7 0
3 years ago
Read 2 more answers
Which type of information should never be given out on social media?
zhenek [66]

Answer:

Sites like Face.book are full of valuable data for people who use social engineering to steal your identity on social media. You should therefore avoid sharing information that's used to verify your identity,

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Your dad just purchased a new desktop with Windows 8 Professional. He is calling you, informing you that he is unable to remote
    9·1 answer
  • \Read the sentence.
    12·1 answer
  • What is a parameter variable?
    8·1 answer
  • The continue statement _________.
    11·1 answer
  • In C#Write the program SubscriptExceptionTest in which you use an array of 10 doubles. Write a try block in which you place a lo
    5·1 answer
  • 2. Select the things you can do when working with rows in columns in a spreadsheet:
    5·1 answer
  • _____ describes the layout of the screen. Block-based, Interface, Editor, Player
    11·2 answers
  • To excel at these professions, you need to be able to combine an eye for elegant design with a mind that delights in efficient o
    8·1 answer
  • When one loop appears inside another, the loop that contains the other loop is called the ____ loop. Group of answer choices ind
    15·1 answer
  • You are creating a web page as part of a science project. Your role is to put your data on the webpage. You tracked the growth o
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!