Write a program that will open a file named thisFile.txt and write every other line into the file thatFile.txt. Assume the input file (thisFile.txt) resides in the same directory as your code file, and that your output file (thatFile.txt) will reside in the same location. Do not attempt to read from or write to other locations.

Respuesta :

Answer:

Check the explanation

Explanation:

The programmable code to solve the question above will be written in a python programming language (which is a high-level, interpreted, general-purpose programming language.)

f = open('thisFile.txt', 'r')

w = open('thatFile.txt', 'w')

count = 0

for line in f:

   if count % 2 == 0:

       w.write(line)

   count += 1

w.close()

f.close()