sawdahassan4 sawdahassan4
  • 05-06-2022
  • Computers and Technology
contestada

Write code that does the following: opens an output file with the filename number_ list.txt, uses a loop to write the numbers 1 through 100 to the file, then closes the file.

Respuesta :

yariyari739
yariyari739 yariyari739
  • 05-06-2022

Answer:

6

Explanation:

# create the file

filemane= "Testfile.txt"

# for writing, we create the iutput file:

output = open(filename, "w")

#Writibg numbers from 1-100

for item in range 1,101):

Answer Link

Otras preguntas

what are 3 facts about xuchal
Both Houses of Congress are part of the legislative branch. True False
The arrow on the spinner is to be spun once. What is the sample space? A. {1, 2, 3, 4, 5, 6, 7, 8, 9, 10) B. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9) C. {1} D. {0}
what happens if i soak a slice of apple in milk for 1 week and left in the refrigerator and if i soak a slice in gatorade?
​Members of the --- are elected on the basis of the state's population at the most recent U.S.census, but each state has an equal number of --- House Senate Sen
What is the volume of the figure? A. 75 cubic units B. 125 cubic units C. 375 cubic units D. 750 cubic units
the perimeter of a rectangle is 222 millimeters if the length of the rectangle is 60 millimeters what is the width of the rectangle
Which was a fundamental element of supply-side economics? corporate tax hikes economic deregulation marginal tax hikes tax hikes strengthen economic regulations
when plates push together they cause
It takes 72,000 gallons of water to fill 12 above-ground swimming pools. Each pool holds the same amount of water. How many gallons of water will fill each swi