An array with 2 rows and 2 columns using the following matrix: 3 1 2 4 b.
Question:
An array with 2 rows and 2 columns using the following matrix:
3 | 1 |
2 | 4 |
b. Select the second row of the array.
c. Select the second column of the array.
d. Select the number in the second row and second column
e. Replace the numbers >2 with 0
2. Plot
a. Generate 10 random numbers between 0 and 1 from uniform distribution and plot the numbers using a line chart. Use these 10 random numbers as the Y variable, and define your own X variable. Use a dashed line and set the line color as grey. Add chart title "line chart," legend "random numbers," and axis labels "x variable, random numbers."
b. Generate 10 random numbers from the normal distribution with 0 mean and 1 standard deviation. Plot the numbers using a bar chart. Use these 10 random numbers as the Y variable, and define your own X variable. Set the bar color as red. Add chart title "bar chart," legend "random numbers_normal distribution," and axis labels "x variable, random numbers."
c. Generate 1000 random numbers from the normal distribution with 0 mean and 1 standard deviation. Plot the numbers using a histogram with 50 bins. Set the color as blue. Add chart title "Histogram," legend "random numbers_normal distribution," and axis labels "Bin, Frequency."
3. Pandas. Use the NBA dataset
a. Sort the data by position and then by salary in ascending order.
b. Select the rows for players in Philadelphia 76ers and age>30.
c. Calculate the standard deviation of players' salary in each team and report the team with the smallest standard deviation.
d. Calculate the mean and 80th percentile salary for each position-age combination.
Vector Mechanics for Engineers Statics and Dynamics
ISBN: 978-0073398242
11th edition
Authors: Ferdinand Beer, E. Russell Johnston Jr., David Mazurek, Phillip Cornwell, Brian Self