subject
Computers and Technology, 10.11.2019 05:31 any71

Write a program to store water usage data of 4 customers in a text file. the program asks the user to enter account number, customer type (r for residential or b for business), and number of gallons used for each of the 4 customers. store the data in a text file named "water. txt". overwrite old data in "water. txt" if the file already exists. the following is an example.
enter account number: 3147
enter r for residential, b for business: r
enter number of gallons used: 1000
enter account number: 2168
enter r for residential, b for business: r
enter number of gallons used: 6002
enter account number: 5984
enter r for residential, b for business: b
enter number of gallons used: 2000
enter account number: 7086
enter r for residential, b for business: b
enter number of gallons used: 8002
the example above writes the following data to the file "water. txt":
3147 r 1000
2168 r 6002
5984 b 2000
7086 b 8002
answer with code i can use with pycharm for python programming?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
What elements related to the release and success of the nes console do you see in modern console releases? what elements are no longer relevant to modern console gaming?
Answers: 3
question
Computers and Technology, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
You know the right answer?
Write a program to store water usage data of 4 customers in a text file. the program asks the user t...
Questions
question
Computers and Technology, 19.07.2019 15:50
Questions on the website: 13722367