Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Part A) : Sports Analytics 60 points The data analyst for ESPN needs to calculate the statistics for Lebron James recent NBA basketball game. Write

(Part A) : Sports Analytics 60 points

The data analyst for ESPN needs to calculate the statistics for Lebron James recent NBA basketball game. Write a program to calculate the two and three point field goal percentages based on the number of total shots attempted and total shots made. Use any of Lebron James most recent game statistics to test program (i.e. can visit stats.nba.com for statistics).

In addition to main(), also use the following six functions in your program:

getNumberOfTwoPointsMade() : a value-returning function that asks for the number of two points made. Use a return statement to send it to main().

getNumberOfThreePointsMade() : a value-returning function that asks for the number of three points made. Use a return statement to send it to main().

getTotalNumberOfShotsAttempted() : a value-returning function that asks for the total number of shots attempted. Use a return statement to send it to main().

getPercentageOfTwoPointsMade() : a value-returning function that calculates the the percentage of two points made. Use a return statement to send it to main().

getPercentageOfThreePointsMade() : a value-returning function that calculates the the percentage of three points made. Use a return statement to send it to main().

IsBetterThanChance() : a value-returning function that returns true or false (true: if he made 50% or above percentages of shots and false: if he made less than 50% percentages of shots) Display message in main() based on this return value.

NOTE:

  1. The problem requires that you determine the parameters needed for each function.
  2. The main() function should display the statistics on the computer screen.
  3. No Global non-constant variables should be used.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Optimization And Data Science Trends And Applications 5th Airoyoung Workshop And Airo Phd School 2021 Joint Event

Authors: Adriano Masone ,Veronica Dal Sasso ,Valentina Morandi

1st Edition

3030862887, 978-3030862886

More Books

Students also viewed these Databases questions

Question

1. Describe the goals of informative speaking

Answered: 1 week ago

Question

to encourage a drive for change by developing new ideas;

Answered: 1 week ago

Question

4 What are the alternatives to the competences approach?

Answered: 1 week ago