ark520_assignment3's People
ark520_assignment3's Issues
Issue 2
Take out any functions that your program does not use (compute_energy)
Issue 1
Take out commented code -- not sure if you heard in class but it's our Prof's pet peeve! :)
Issue-3
In the function definition as well as the function call to report_energy in lines 130 and 183, the assignment of BODIES=BODIES is redundant. By doing this, you are making two copies of the reference to the BODIES dictionary object.
Instead, you can just do one of the below changes
-
Using just BODIES in both these functions will
(i) pass a reference to the global BODIES object in the function call
(ii) receive a reference to the global BODIES object in the function definition -
Do the BODIES assignment in the function definition argument list only and NOT pass anything corresponding to BODIES in the function call. In fact, this is what you have done for the function
nbody in line 198.
All these make shallow copy of the BODIES dictionary. If you want to do the deep copy, you can use copy.deepcopy(BODIES)
Issue-4
In to_do function, the naming of the variables thing_for_v1 and thing_for_v2 doesn't follow the naming convention. You could use something like body1_velocity_arg and body2_velocity_arg.
OR if you have a better name that convey more information about that variable, you can use that instead.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.