Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

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.

Sagot :

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):