Skip to content

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