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
HACTEHA [7]
4 years ago
8

Consider the following Python program. fin = open('words.txt') for line in fin: word = line.strip() print(word) What is word?

Computers and Technology
1 answer:
patriot [66]4 years ago
4 0

Answer:

(c) A list of words

Explanation:

<em>First let's format the code properly</em>

fin = open('words.txt')

for line in fin:

     word = line.strip()

     print(word)

<em>Second, let's explain each line of the code</em>

Line 1:

The open() function is a built-in function that takes in, as argument, the name of a file, and returns a file object that can be used to read the file.

In this case, the name of the file is <em>words.txt. </em>Therefore, the variable <em>fin </em>is a file object which contains the content of the file - <em>words.txt</em>

Line 2:

The <em>for </em>loop is used to read in each line of the content of the file object (fin).

Line 3:

Each line of the contents is stripped to remove any trailing and leading white spaces by calling on the <em>strip()</em> function. The result of the strip is stored in the variable <em>word.</em>

Line 4:

The content of word at each of the cycles of the loop is printed to the console.

Therefore,  the overall output of the program is a list of words where each word represents a line in the target file (words.txt)

You might be interested in
Which describes the first step a crawler-based search engine uses to find information?
elena-14-01-66 [18.8K]
C is the correct answer to the problem
6 0
3 years ago
Read 2 more answers
Which file contains full and incremental back-up information for use with the dump/restore utility?
Ivahew [28]

The file that contains full and incremental back-up information for use with the dump/restore utility is <u>/etc/dumpdates.</u>

<u></u>

<h3>What is dump/restore utility ?</h3>

Dump examines files in a filesystem, determines which ones need to be backed up, and copies those files to a specified disk, tape or other storage medium. Subsequent incremental backups can then be layered on top of the full backup.

The restore command performs the inverse function of dump; it can restore a full backup of a filesystem. Single files and directory subtrees may also be restored from full or partial backups in interactive mode.

Learn more about incremental backups

brainly.com/question/5849057

#SPJ4

3 0
2 years ago
The words, the computer is the future, has how many bits?
Nadusha1986 [10]

The words, the computer is the future, has 64 bits.Modern computer has

two types of processors which include:

  • 32 bit
  • 64 bit
<h3>Bits</h3>

This is referred to as the smallest unit of data which is used in a computer.

The 32 bit computer are the old types which have a smaller processor and is

relatively slow.

The 64 bit computer on the other hand are the modern types with large

processors and are relatively fast.

Read more about Computer here brainly.com/question/13380788

4 0
2 years ago
How do i make a PDF and what is a PDF<br><br> sorry i am dumb
Soloha48 [4]

Answer:

............................................

Explanation:

5 0
3 years ago
The process of data gathering is generally referred to as:
Snowcat [4.5K]
He answer is analytics.  The process of data gathering is generally referred to as analytics.   
7 0
3 years ago
Other questions:
  • What's the difference in unicode value between 'e' and 'a'? (consult a table of unicode values):?
    7·1 answer
  • (TELL ME WHY PLEASE!! THANK YOU!!)
    9·2 answers
  • Why might a photographer be interested in capturing the human element in his/her images? Describe your favorite example that dem
    5·1 answer
  • 4. What is the simplest way to permanently get rid of an unwanted file?
    12·1 answer
  • The mechanism that establishes the medullary osmotic gradient depends most on the permeability properties of the ________. A. co
    5·1 answer
  • What happens when you apply a theme to a form?
    14·1 answer
  • Hi, I am from India. Our brainly platform isn't so good, many of 'em keep spamming questions that I ask. US platform seems much
    9·1 answer
  • What is meant by reflection?​
    9·2 answers
  • Contrast between functions of sort and sorted in python . ​
    10·1 answer
  • Completar Fill in the blanks with the correct familiar commands. dar (negative) 1 of 1 Question 2 with 1 blank hacer (affirmativ
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!