subject

1. Use three counter variables named counter_com, counter_edu and counter_org to keep track of how many of each you find. Declare these just under the comment with your name/date at the top of the file. 2. Write a program that opens mbox. txt, reads through the file, and finds lines that contain e-mail addresses ending in .com, .edu and .org. Use .find() to identify lines where one of these exist.
3. Define an output file towards the top of your code-named "emails_output. txt" (just do this as the next line after you open the mbox. txt file). Any time you find() a line in mbox. txt that has the .com, .edu, or .org email address in it, increment the proper counter and write the entire line to your emails_output. txt file.
4. Once you have finished reading through the mbox. txt file, print your counter totals.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
You know the right answer?
1. Use three counter variables named counter_com, counter_edu and counter_org to keep track of how m...
Questions
question
History, 29.11.2019 22:31
question
Social Studies, 29.11.2019 22:31
question
Mathematics, 29.11.2019 22:31
Questions on the website: 13722360