Question: Write a python program that asks the user for the name of a file, and then repeatedly asks the user to enter a number, entering

Write a python program that asks the user for the name of a file, and then repeatedly asks the user to enter a number, entering the number 0 when finished. Output each of these numbers to the file on a separate line.
Example program run:
> python3 write_numbers.py
User inputs:
out.txt
25
34
14
0
Output file out.txt created with the following contents: 25
34
14

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!