Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with number 6 and only use the Python language. 8.414310A 0.31278/11) 4-Generate uniformly distributed 20 numbers from 1 to 100. Write a Python

Please help with number 6 and only use the Python language.
image text in transcribed
8.414310A 0.31278/11) 4-Generate uniformly distributed 20 numbers from 1 to 100. Write a Python code which asks the user for a number n and find the nearest value ton in the array [4): import numpy as np x - np.linspace(0, 100, num - 20, dtype - int) y - np.zeros((20)) print (x) n = int(input("Enter number n: ")) for 1 in range (len(x)): y[1] - x[i]-n z - minty, key-abs) print("Nearest value ton - "str(z)) [ 0 5 10 15 21 26 31 36 42 47 52 57 63 68 73 78 84 89 94 169] Enter number n: 21 Nearest value to n - 21.0 5. Write a Numpy program to find the most frequent value in an array of 30 random integers in [ ): import numpy as np X = np.randon.randint and std deviation 20% Plot the histogram of the array and line plot on the same figure which 6- Generate 1000 point array with normal distribution of mean fits to the histogram Add also labels and title to the figure

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

Step: 3

blur-text-image

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

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

Write short notes on Interviews.

Answered: 1 week ago

Question

politeness and modesty, as well as indirectness;

Answered: 1 week ago