San Diego State University Programming Question

Upload 2 files: the program as a “.py” file. A copy of its execution as a notepad or word file

Write and execute a Python program for the following problem where a few simple statistics for a soccer league week will be computed.

Each team plays one match. Each match has a winner and a loser. In a match, one team is the home team, and one team is the visiting team. At least one goal is scored in any match.

Data will be read in the following order, one match after the other:

Name of home team

Score of the home team

Name of the visiting team

Score of the visiting team

…………

Enter “

done

” when there is no more matches.

Calculate and display the following results.

Number of games

Number of wins by the home teams, number of wins by the visiting teams.

Total number of goals and average scored by the home teams, by the visiting teams

Total number of goals and average conceded by the home teams, by the visiting teams

Total and average goal differential for the home teams

Total and average goal differential for the winning teams

Team with the largest number of goals scored, team with the largest goal differential (if several teams have the same value, pick any one). Indicate if home team or visiting team.

Execute the program on the following data (each data must be on separate line, not like here). Do not use advance features such as lists, tuples, arrays. Data must be inputted by execution of the program, they must not be “hard-coded” in the program)

AA 4 Bb 0

Cix 2 Doe 6

Elo 1 PSG 7

OM 3 As 0

MU 10 Mc 3

Rm 1 Bar 8

Losc 5 Br 14

done

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order