Open
Conversation
Submission of Homework by Philip Ulrich.
Contributor
|
Nice 1 m8 |
Author
|
uwotm8 |
cwehmeyer
requested changes
Nov 15, 2018
Member
cwehmeyer
left a comment
There was a problem hiding this comment.
A few comments:
- please only commit empty notebooks
- the first cell raises a syntax error (see below)
- you can replace loops by using vectorized code (see below)
- your use of white spaces and blank lines deviates a lot from the PEP8 recommendation
- please rename your file as
project-2-compsci-philipuwithin this PR
Syntax error in first cell
File "cell_name", line 6
SyntaxError: from __future__ imports must occur at the beginning of the fileNonvectorized code example
oldpos=pos
for j in range(1,len(pos)-1):
new_pos=pos[j]+timestep*vel[j]+timestep**2*acceleration(j,pos)/2
pos[j]=new_pos
new_vel=vel[j]+timestep*(acceleration(j,oldpos)+acceleration(j,pos))
vel[j]=new_vel
cwehmeyer
requested changes
Nov 19, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submission of Homework by Philip Ulrich.