Problem #1: [35 pts] Write a program that calculates the points earned by a soccer team....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem #1: [35 pts] Write a program that calculates the points earned by a soccer team. The program reads from the user the number of games the team won and the number of games ended as a draw. Note that a win brings 3 points to the team and a draw brings 1 pt. Your program also prompts the user to enter the number of expected points and displays a message "Your expectation is so close" if the difference between the earned points and the expected points less than 5. Otherwise, it prints "The points difference is higher than 5" Sample Run 1: Enter the number of games won: 20 Enter the number of draws: 7 The team earned 67 points Enter the expected points for the matches: 70 Your expectation is so close Sample Run 2: Enter the number of games won: 2 Enter the number of draws: 10 The team earned 16 points Enter the expected points for the matches: 9 The points difference is higher than 5 The points difference is higher than 5 Problem #1: [35 pts] Write a program that calculates the points earned by a soccer team. The program reads from the user the number of games the team won and the number of games ended as a draw. Note that a win brings 3 points to the team and a draw brings 1 pt. Your program also prompts the user to enter the number of expected points and displays a message "Your expectation is so close" if the difference between the earned points and the expected points less than 5. Otherwise, it prints "The points difference is higher than 5" Sample Run 1: Enter the number of games won: 20 Enter the number of draws: 7 The team earned 67 points Enter the expected points for the matches: 70 Your expectation is so close Sample Run 2: Enter the number of games won: 2 Enter the number of draws: 10 The team earned 16 points Enter the expected points for the matches: 9 The points difference is higher than 5 The points difference is higher than 5
Expert Answer:
Answer rating: 100% (QA)
Here is the python code def calculatepoints Get the number of wins and draws from the user wins intinputEnter the number of games won draws intinputEn... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Valenzuela Corporations financial position is represented by the nine balances shown on the first line of the following schedule ($ in thousands). Assume that a single transaction took place for each...
-
By the hint, solve part a and part b below:
-
Miller Company manufactures a line of lightweight running shoes. CEO Richard Miller estimated that the company would incur $7,000,000 in manufacturing overhead during the coming year. Additionally,...
-
For rigid-body motion, the strains will vanish. Under these conditions, integrate the straindisplacement relations (7.6.1) to show that the most general form of a rigid-body motion displacement field...
-
One of the larger species of tarantulas is the Grammostola mollicoma, whose common name is the Brazilian giant tawny red. A tarantula has two body parts. The anterior part of the body is covered...
-
Use a time series chart to display the data shown in the table. The data represent the percentages of the U.S. gross domestic product (GDP) that come from the construction sector. Organize the data...
-
One of the key features of CSF use is making the implicit into explicit, explain what this means in an operational context.
-
Refer to the original data in P22-30B and the revisions presented in P22-34B. Requirements 1. Prepare the schedule of budgeted cash collections from customers for April and May. 2. Prepare the...
-
Prospect Realty Co. pays weekly salaries of $18,030 on Monday for a six-day workweek ending the preceding Saturday. Journalize the necessary adjusting entry at the end of the accounting period,...
-
Selected transactions completed by Kornett Company during its first fiscal year ended December 31, 20Y8, were as follows: Jan. 3. Issued a check to establish a petty cash fund of $4,500. Feb. 26....
-
You are interested in an investment where the initial investment is $108,000and your required cost of capital is12percent. Cash inflows from this project are expected to be $9,900at the end of the...
-
Consider the diver shown in the figure diving from a 10-m high platform. The diver completes 1.5 rotations, while also rising and falling vertically and moving forward horizontally. We will assume...
-
The Beam structure below, point C is an internal hinge. The cross-section of the shape forming the beam is shown, which is symmetrical about both the y-axis and the z-axis as shown. This cross-...
-
Consider the following scenario: You might have been driving a little too fast when a police officer stops you. Write code to determine the type of ticket you are to receive and the charge of the...
-
Consider the control system in Figure where v(t) is a sinusoidal disturbance, v(t)=sin(t). Compute the absolute value of the sensitivity function at w = 1 rad/s as a function of K. How must K be...
-
There are many ways to analyze costs in healthcare organizations. If you could design a costing method for your organization for profit analysis and cost containment how would you begin to assess the...
-
Adolescents can develop a substance use disorder by the environment they are surrounded in. Depending if the adolescent is going through emotional or mental issues and they are having negative...
-
Why can wastewater treatment requirements in Hawaii be less stringent than those in most locations on the U.S. mainland?
-
The folium of Descartes is the graph shown in the figure. In parametric form its equation is given by: x = 3t/1 + t3 and y = 3t2/1 + t3 for t 1 (a) Use MATLAB to show that the equation of the folium...
-
An isosceles triangle sign is designed to have a triangular printed area of 600 in.2 (shaded area with a base length of a and height of h in the figure). As shown in the figure, there is a 2 in. gap...
-
A cross section of a river with measurements of its depth at intervals of 40 ft: is shown in the figure. Use numerical integration to estimate the cross-sectional area of the river. 607179 49442794 62
-
The U.S. system leans toward a heavy education requirement mixed with practice, and the British system leans more toward a heavy experience requirement bordering on apprenticeship. Which system is...
-
If you were a certified accountant in your home country and wanted to practice as an auditor in another country, you would most likely not be allowed to practice. Why do these barriers to entry...
-
In this chapter, we discussed the personal qualifications, educational requirements, and experience requirements of different countries. Develop a matrix that includes countries down one side and the...
Study smarter with the SolutionInn App