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 17:30
Think about the poem "old ironsides." drag the subject of the poem to the subject box and the theme to the theme box. then decide whether each excerpt from the poem supports the subject or the theme.
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
Answers: 2
question
Computers and Technology, 24.06.2019 19:50
Which is a characteristic of free and open-source software licenses? a. the source code is unavailable to everyone b. the source code is available only to the government c. the source code is available to all users d. the source code is constantly modified
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
Mathematics, 07.04.2020 19:40
question
Social Studies, 07.04.2020 19:41
question
English, 07.04.2020 19:41
Questions on the website: 13722361