Giter Site home page Giter Site logo

ark520_assignment3's People

Contributors

drewkunas avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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

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

  2. 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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.