Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Python: Please include #comments in each line for explanation. UPDATED CSV: http

ID: 3812997 • Letter: P

Question

Python: Please include #comments in each line for explanation.

UPDATED CSV:

https://docs.google.com/spreadsheets/d/139XV0V8yY7NuK39ac1DD6dZyxSmloGUutGyhwubVyvQ/edit?usp=sharing

Who was the best NBA basketball player? The NBA is North America's professional men's basketball league. You are going to write a program to find the best players in NBA history. Using the csv file provided with the lab. Calculate the efficiency for each player, using the csv file provided with the lab. NBA player's performance is evaluated using the following efficiency formula Efficiency (pts reb asts stl blk) (fga fgm +(fta -ftm turnover gp 1. Find the top 50 players with the best efficiency results and Display those 50 from best to Worst. 2. Find and display the Player who played the most minutes 3. Find and display the player who play the most games 4. Find and display the Player who scored the most points 5. Find and display the Player who got the most penalties. 6. Find and display the Player who made the most free throws. Remember: All indexes start on ZERO The First line in the file provides the labels of the columns.

Explanation / Answer

public category TTTConsoleNonOO2P cipher = 2;

// Name-constants to represent the varied states of the sport
public static final int enjoying = 0;
public static final int DRAW = 1;
public static final int CROSS_WON = 2;
public static final int NOUGHT_WON = 3;

// the sport board and also the game standing
public static final int ROWS = three, COLS = 3; // range of rows and columns
public static int[][] board = new int[ROWS][COLS]; // game board in 2nd array
// containing (EMPTY, CROSS, NOUGHT)
public static int currentState; // this state of the sport
// (PLAYING, DRAW, CROSS_WON, NOUGHT_WON)
public static int currentPlayer; // this player (CROSS or NOUGHT)
public static int currntRow, currentCol; // current seed's row and column

public static Scanner in = new Scanner(System.in); // the input Scanner

/** The entry main methodology (the program starts here) */
public static void main(String[] args) {
// Initialize the game-board and current standing
initGame();
// Play the sport once
do else if (isDraw())
// Otherwise, no amendment to currentState (still PLAYING).
}

/** come back true if it's a draw (no additional empty cell) */
// TODO: Shall declare draw if no player will "possibly" win
public static Boolean isDraw() mountain pass = 0; gap < COLS; ++col) {
if (board[row][col] == EMPTY) {
come back false; // AN empty cell found, not draw, exit
}
}
}
come back true; // no empty cell, it is a draw
}

/** come back true if the player with "theSeed" has won once inserting at
(currentRow, currentCol) */
public static Boolean hasWon(int theSeed, int currentRow, int currentCol) {
come back (board[currentRow][0] == theSeed // 3-in-the-row
&& board[currentRow][1] == theSeed
&& board[currentRow][2] == theSeed
|| board[0][currentCol] == theSeed // 3-in-the-column
&& board[1][currentCol] == theSeed
&& board[2][currentCol] == theSeed
|| currentRow == currentCol // 3-in-the-diagonal
&& board[0][0] == theSeed
&& board[1][1] == theSeed
&& board[2][2] == theSeed
|| currentRow + currentCol == two // 3-in-the-opposite-diagonal
&& board[0][2] == theSeed
&& board[1][1] == theSeed
&& board[2][0] == theSeed);
}

/** Print the sport board */
public static void printBoard() mountain pass = 0; gap < COLS; ++col) every of the cells
if (col != COLS - 1)