-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Done task 1 and task 2 #2
base: master
Are you sure you want to change the base?
Conversation
Done Task 1 and Task 2
a = np.random.random((1,500)) | ||
|
||
x = np.arange(0.1,100,.1) | ||
y = (1/0.001)* np.log(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were supposed to plot the y values for a, rather than taking x. This is fine too!
i=0 | ||
for a in x: | ||
sum = sum + (x[i]*y[i]) | ||
i=i+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should write the loop something like this:
for i in range(len(x)):
sum = sum + x[i]*y[i]
a = np.random.random((1,500)) | ||
|
||
x = np.arange(0.1,100,.1) | ||
y = (1/0.001)* np.log(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a function for (1/0.001)* np.log(x).
No description provided.