Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

sid573
Copy link

@sid573 sid573 commented May 23, 2018

No description provided.

@sid573 sid573 changed the title Done task 1 Done task 1 and task 2 May 23, 2018
a = np.random.random((1,500))

x = np.arange(0.1,100,.1)
y = (1/0.001)* np.log(x)
Copy link
Collaborator

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
Copy link
Collaborator

@deepakgouda deepakgouda May 26, 2018

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)
Copy link
Collaborator

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants