ubsuny / CP1-24-HW3

Homework 3 template for CP1-24
1 stars 16 forks source link

Coulomb's law #32

Closed p-pxmpo closed 6 days ago

p-pxmpo commented 1 week ago

This pull request includes:

coulomb.py - defines the coulomb's constant and uses the lambda function to define q1, q2, and r and passes it into the Coulomb's law function

coulombtest.py - unit test file for the functions defined in coulomb.py

coulombmain.py - imports the lambda function from coulomb.py and uses that function to calculate the electric force with user input for q1, q2, and r. Uses the map function to convert user input for microcoulombs to coulombs.

please review and push

p-pxmpo commented 1 week ago

Pylint says "all checks have failed" what should I do?

laserlab commented 1 week ago

Check the details of the pylons part that failed and fix the linting issues

laserlab commented 1 week ago

You're code is at a 4.86/10 😢

laserlab commented 1 week ago

Check particularly: CoulombsLaw/coulomb.py:5:27: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)

I mentioned that in my slides on the lambda function. While that works it is strongly discouraged!

laserlab commented 1 week ago

@dhamalakamal Please review asap

p-pxmpo commented 1 week ago

fixed some of the linting issues

p-pxmpo commented 1 week ago

Fixed the unnecessary lambda assignment issue.

p-pxmpo commented 1 week ago

fixed all of the linting issues :sweat_smile:

laserlab commented 6 days ago

Merging with minor linting issues