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
When you see an ad on social media that relates to your profile or something
sesenic [268]

Answer:

Tritium BF

Explanation:

5 0
2 years ago
Read 2 more answers
Which principle or element of layout design is highlighted in this event poster?
Oduvanchick [21]

The  principle or element of layout design is highlighted in an event poster in option i: The headline.

<h3>What are the elements of page layout?</h3>

The poster is known to be one that often uses a kind of hierarchy and centered text alignment as its element.

Note that it is one whose Lines of use is said to be made up of different kinds of type styles, sizes and others.

The simple elements of an advertising poster is made up of:

1. The headline.

2. The sub-head.

3. The body copy.

4. The caption.

The elements of page layout are visual hierarchy, visual flow, and others. Hence, the  principle or element of layout design is highlighted in an event poster in option i: The headline.

Learn more about layout design from

brainly.com/question/2501083

#SPJ1

6 0
2 years ago
((11111111-1011100) X (10100 / 10))- ( 110010000+ 1110011)
dsp73

Answer:

10089891099

Explanation:

?

3 0
3 years ago
List and briefly explain five activities for which a purchasing department normally has responsibility
melamori03 [73]
<span>Five activities for which a purchasing department normally has responsibility include: issuing their own purchase orders, meeting with different sales representatives, maintaining their own purchase records in accordance with state and federal law, administering contracts with sellers, and coming to a resolution regarding any purchasing problems that might arise.</span>
5 0
3 years ago
In Bash, what commands can you use to view the contents of a document?
AlekseyPX

You can use the cat and less command to view the contents of a file.

hope this helps! :)

8 0
1 year ago
Other questions:
  • The code segment below uses the procedure IsPartOf (list, item), which returns true if item appears in list and returns false ot
    13·1 answer
  • You are evaluating the bounce rate of your overall website traffic and find that users with a social media referral source have
    9·1 answer
  • Matching: match each step with its correct sequence number. This question tests whether you know the order in which a CPU perfor
    14·1 answer
  • Why did Hunter gatherers moved into the<br>America's?​
    8·1 answer
  • Businesses use spreadsheets to keep track of financial________.
    14·1 answer
  • IOS jail broken or Android unrooted which is better to hack with
    6·1 answer
  • Whats important about the points?
    10·2 answers
  • List two types of energy sources
    10·2 answers
  • Use the drop-down menus to complete statements about archiving and backing up data fileArchiving data files manages the size of
    5·2 answers
  • What is the top 3 cloud provider in the world with statics or data including the example and reason(s).
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!