Questions
Discuss the how residence sales are treated under the tax law. You may want to refer...

Discuss the how residence sales are treated under the tax law. You may want to refer to Section 121 of the tax code and to the IRS publication 523.   What are the requirements for it to qualify as a "residence" sale?   What are the limitations?   Why does the law provide this benefit to taxpayers? What if the taxpayer has more than one home, can 2 or more homes qualify?   What is the 2-year rule all about?

In: Accounting

Discuss the how residence sales are treated under the tax law. You may want to refer...

Discuss the how residence sales are treated under the tax law. You may want to refer to Section 121 of the tax code and to the IRS publication 523.   What are the requirements for it to qualify as a "residence" sale?   What are the limitations?   Why does the law provide this benefit to taxpayers? What if the taxpayer has more than one home, can 2 or more homes qualify?   What is the 2-year rule all about?

In: Accounting

GOVERNMENT QUESTION How is same-sex marriage a federal (national) issue, and how is same-sex marriage a...

GOVERNMENT QUESTION

How is same-sex marriage a federal (national) issue, and how is same-sex marriage a state issue? Explain thoroughly and use the constitution as a basis for both.

In: Economics

NOTE : ESSAY QUESTION - PLEASE ANSWER IN DETAIL (1-2 paragraphs) Question : Discuss the characteristics,...

NOTE : ESSAY QUESTION - PLEASE ANSWER IN DETAIL (1-2 paragraphs)

Question : Discuss the characteristics, inheritance, and development of cancer; specifically talk about the role of genes, gene regulation, and the environment in the development of cancer. In addition, make sure to talk about why it is so difficult to treat/cure cancer.

In: Biology

when you would want to use collision theory over transition state theory and when you would...

when you would want to use collision theory over transition state theory and when you would want to use transition state theory over collision theory. Provide examples for both. Use literature citations to support your information. Follow the same formatting as requested in the group project reports.

In: Chemistry

Evaluate the strategy of a multinational business organization Using your interpretation of the course material on...

  • Evaluate the strategy of a multinational business organization

Using your interpretation of the course material on strategy and the strategic management process submit a response to the following:

  • Identify the elements of the strategy of a multinational corporation of your choice.
    • Is the strategy of this organization successful?
    • What is the evidence?
  • Identify and state the name of a close competitor (i.e., a company in the same industry) of your chosen company.
    • How is the competitor’s strategy different than that of the company you selected?
  • Which company’s strategy is more successful and why?
  • What initial conclusion about strategic management can you draw based on your investigation?

In: Operations Management

Covid-19 has disrupted many businesses and changed the business environment. •As a CRM consultant, was asked...

Covid-19 has disrupted many businesses and changed the business environment.

•As a CRM consultant, was asked by a local business magazine to write an article about how organizations can use CRM to restore business.

•Propose guidelines about how companies should do and what they should avoid doing. And, explain reasons for such guidelines.

In: Economics

Use the function f(x) = 2x3 - 6x2. Clearly mark your answer for each part. Find...

Use the function f(x) = 2x3 - 6x2. Clearly mark your answer for each part.
Find the x and y intercepts. Give your answer as points.
State the intervals of increase and decrease.

State the local maximum and minimum points.

State the intervals of concave up and concave down.

State any in ection points.

Graph the function. Label any relevant points found in the above parts.

In: Math

Please use python3 Create the function team_average which has the following header def team_average(filename): This function...

Please use python3

Create the function team_average which has the following header

def team_average(filename):

This function will return the average number of games won by the Red Sox from a text file with entries like this

2011-07-02      Red Sox @  Astros       Win 7-5
2011-07-03      Red Sox @  Astros       Win 2-1
2011-07-04      Red Sox vs Blue Jays    Loss 7-9

This function should create a file object for the file whose name is given by the parameter filename.

If the file cannot be opened, use a try/except statement to print an error message and don't do any further work on the file.

The function will count the number of lines and the number of games the Red Sox won and use these values to compute the average games won by the team.

This average should be expressed as an integer.

Test Code

Your hw2.py file must contain the following test code at the bottom of the file

team_average('xxxxxxx')
print(team_average('red_sox.txt'))

For this test code to work, you must copy into your hw2 directory the file red_sox.txt from /home/ghoffman/course_files/it117_files.

To do this go to your hw2 directory and run cp /home/ghoffman/course_files/it117_files/red_sox.txt .

Suggestions

Write this program in a step-by-step fashion using the technique of incremental development.

In other words, write a bit of code, test it, make whatever changes you need to get it working, and go on to the next step.

  1. Create the script hw2.py using nano or some other Unix text editor.
    Enter the header for team_average into the script.
    Under this header write the Python statement pass.
    Copy the test code above into the script.
    Make the script executable.
    Run the script.
    If all you see is None, proceed to the text step.
  2. Remove the pass statement.
    In its place write the function code to open the file for reading.
    This code should print an error message and exit the function if the file cannot be opened for reading.
    Run the script.
    You should see
    Cannot open xxxxxxx
    None
  3. Modify the function so it prints out the lines of the file.
  4. Modify the function to use the split string method to create a list from the from the different fields in a line. Print this list.
  5. For each line, get the value of the won_lost field and print it.
    This field is second to last entry in the list you created by using the split method.
    The lists will have different lengths, since some team have a single word as their name, and others have two words, e.g. White Sox.
    The easiest way to get the second to last field is to use a negative index.
    Print the value of won_lost field.
  6. Comment out or delete the line that prints the won_lost field.
    Initialize an accumulator to count the number of lines.
    Increment this accumulator inside the for loop.
    Return the total number of lines.
  7. Initialize an accumulator to count the number of Red Sox wins.
    In the for loop increment this accumulator every time the value of won_lost is "Win".
    Return the number of games won.
  8. Change the return statement so it returns integer percent of the number of games the Sox won.

Output

When you run the completed script, you should see

Error: Unable to open xxxxxxx
76

In: Computer Science

What is the confirmatory test for ammonium ion, NH4+?   A) A white solid will precipitate....

What is the confirmatory test for ammonium ion, NH4+?

  A)

A white solid will precipitate.

  B)

Production of ammonia gas, NH3, and blue litmus paper turning red because it is acidic.

  C)

Production of ammonia gas, NH3, and red litmus paper turning blue because it is basic.

  D)

A red brown precipitate will form.

In: Chemistry