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
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]3 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
How do I answer a question on Brainly.com without an “oops” notification?
Paul [167]
You just type in the answer as long as it is more then 20 characters
3 0
3 years ago
Read 2 more answers
Why did it take fewer 1-inch tiles than 1-centimeter tiles to measure the length of the cookie cutter?​
Romashka-Z-Leto [24]

The inch tiles are larger, meaning they use less space.

6 0
3 years ago
What number will this code return?<br> Math.max(7, 5, 9);
Anon25 [30]
9

JavaScript’s Math module has a max method that finds the max of the given arguments.

I’m not sure how I can be any clearer
I’ve attached a screenshot if you still have no clue

8 0
2 years ago
1. What does the word “processing” in data pro- cessing mean?
blsea [12.9K]

Answer:

Word processing is the process of creating and editing documents on a computer. It allows a user to create documents that mimic the format and style of a typical typewriter. It requires a computer and word processing software. A printer may also be used to create a physical copy of the document.

Explanation:

6 0
3 years ago
Read 2 more answers
This function whose primary purpose is to display information to the user can only display one value at a time.
Leya [2.2K]

Answer:

False

Explanation:

The functions that was made for display content can get  arguments of different type e.g. (Int, string, Array, Objects) and if you want to display n values you only have to check the syntax of your programming language to separate one of each other

# Python example

a = "Hello-"

b = "World"

c = 10

print(a,b,c)

#Out: Hello-World10

I hope it's help you.

4 0
3 years ago
Other questions:
  • A compound document contains _______ from different applications.
    12·2 answers
  • Why might a government entity choose to offer some information and services online as in e-government
    8·2 answers
  • Give one example of a civil engineering structure.
    5·1 answer
  • __________ involves determining what qualities are to beused to perform project activities.
    9·1 answer
  • Candice’s first job was at the grocery store making deli food. While in culinary school, she worked part time in a restaurant ki
    12·2 answers
  • Write assembly programs with the following I/O
    15·1 answer
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • What is the correct order for writing the 3 dimensions for a 3D object? Here are the 3 dimensions:
    15·1 answer
  • In two to three sentences, define "home row" and explain why it is important.
    6·2 answers
  • What are your strongest competencies? What will you do them? <br>❌NONSENSE ANSWER<br>​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!