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]
2 years ago
15

Write a program that reads in a text file, infile.txt, and prints out all the lines in the file to the screen until it encounter

s a line with fewer than 4 characters. Once it finds a short line (one with fewer than 4 characters), the program stops. Your program must use readline() to read one line at a time. For your testing you should create a file named infile.txt. Only upload your Python program, I will create my own infile.txt using break
Computers and Technology
1 answer:
ivanzaharov [21]2 years ago
8 0

Answer:

Explanation:

f=open("infile.txt","r")

flag=True

while(flag):

s=f.readline().strip()

if(len(s)>=4):

print(s)

else:

flag=False

You might be interested in
A statement describing both the requirements that must be met by a product or process amd the ways in which satisfaction of the
Lelechka [254]
I will rewrite your question and complete it.

A statement describing both the requirements that must be met by a product or process amd the ways in which satisfaction of the requirements will be measured is called a  ASTM test.

ASTM tests are given to check the requirements and standards on products or system.
5 0
3 years ago
Read 2 more answers
Which shot is not the best for a widescreen image
sasho [114]
Closeup? I think I’m pretty sure but I don’t really know though
7 0
3 years ago
Read 2 more answers
Pseudocode is an improvement over the IPO chart because it lays out the a0 sequence of steps for a particular program.
Olegator [25]

Answer:

Yes. Pseudocode is an improvement over the IPO chart because it lays out the sequence of steps for a particular program

Explanation:

The input–process–output (IPO) chart is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or other process. The chart has three components (Input, Process and Output), and you write the description of each component in plain English, not code or mathematical formulas.

Pseudocode is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.

Pseudocode is an improvement over the IPO chart because it shows the step by step sequence to be followed by a particular program unlike the IPO chart which just break the program into Input, Process and Output.

6 0
3 years ago
Donna is a graphic designer working on a poster for a music concert. What is her objective?
Marina86 [1]

Answer:her objetive is to impress the public with the poster.

Explanation:

The poster have to be about the music. It is very important for the singer or the festival.

The objetive is going on with the festival, with the music and with the concert’s style.

It’s a personal design. But it have to be original for every design.

3 0
2 years ago
Read 2 more answers
Free up disk space by doing____?​
8090 [49]

Answer:

Deleting files and etc on your computer.

6 0
3 years ago
Read 2 more answers
Other questions:
  • WHEN COPYING EXISTING SPREADSHEET DATA TO A WORD DOCUMENT YOU NEED TO SELECT?
    12·1 answer
  • What is the main purpose of cutting plane line arrows?
    7·1 answer
  • A user calls the help line and ask for some help installing a new keyboard. He isn't sure how to plug the keyboard into the comp
    15·1 answer
  • Which of these is not one of the main parts of an email
    9·1 answer
  • If you copy a drawing from the Internet and use it in a report, you might be violating the artist's
    8·1 answer
  • What code do I have to use in my php if i don’t want my $_SESSION[“variablex”] to destroy? But i already have a session_destroy(
    6·1 answer
  • Write a method named lastIndexOf that accepts an array of integers and an * integer value as its parameters and returns the last
    15·1 answer
  • What type of app is Drake designing? Drake is designing a mobile app for an online travel blog. The app will enable browsers to
    5·1 answer
  • Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtm/​
    5·2 answers
  • Would my phone still work if I snapped it in half?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!