Question: File name shoppers _ data and value new _ shopper are read from input. Perform the following tasks: Open the file shoppers _ data for

File name shoppers_data and value new_shopper are read from input. Perform the following tasks:
Open the file shoppers_data for writing and assign shoppers_file with the opened file.
Write new_shopper followed by a newline to shoppers_file, overwriting any existing contents.
Close shoppers_file.
Click here for example
Note: The challenge activity will read and output the file named shoppers_data.
This is whats provided to start
shoppers_data = input()
new_shopper = input()
''' Your code goes here '''

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 Programming Questions!