ubsuny / CP1-24-HW3

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

Calculating electric potential due to a point charge using lambda functions and maps. #40

Closed Tolani4 closed 6 days ago

Tolani4 commented 1 week ago

This Pull Request implements a Python function to calculate the electric potential V at various distances due to a point charge. The calculation is based on Coulomb's Law and uses functional programming concepts, lambda functions, list comprehension, and map() function for implementation.

Tolani4 commented 1 week ago

After submitting my pull requests I'm still receiving errors from github specifically pylint. Am I just supposed to apply the changes it recommends such as " C0301: Line too long (108/100) (line-too-long)"

laserlab commented 1 week ago

After submitting my pull requests I'm still receiving errors from github specifically pylint. Am I just supposed to apply the changes it recommends such as " C0301: Line too long (108/100) (line-too-long)"

yes, since the reviewer will point it out and we want to write compliant code

laserlab commented 1 week ago

Though your low score (1.3/10) most likely stems from more serious issues like:

Electric_potential_due_to_point_charge.py/Electric_potential.py:30:21: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)

which I discussed in class as we talked about lambda functions

Tolani4 commented 1 week ago

Okay thank you. For the "missing module docstring" error. Do I just need to create a separate file called docstring and just explain my code and the physics behind it? and for the error "C0115: Missing class docstring (missing-class-docstring)", Do I just create a class called docstring in that file? Just trying to understand what the errors mean.

laserlab commented 1 week ago

As we discussed in class docstring explanation can be found in the lecture slides in hands on examples and here:

https://peps.python.org/pep-0257/

laserlab commented 1 week ago

@ojha-aditya Please review asap

ojha-aditya commented 1 week ago

Can I as reviewer resolve this notification about the branch being out-of-date or we simply mention it in the review as a todo?

ojha-aditya commented 1 week ago

Also, do we need to have a main function in the module?

laserlab commented 1 week ago

Also, do we need to have a main function in the module?

no, since it’s a module

laserlab commented 1 week ago

Can I as reviewer resolve this notification about the branch being out-of-date or we simply mention it in the review as a todo?

you an mention it

ojha-aditya commented 1 week ago

We should not mention the things you have already pointed in our review @laserlab should we?

laserlab commented 1 week ago

We should not mention the things you have already pointed in our review @laserlab should we?

Please mention all you noticed, independent from what I comment.

ojha-aditya commented 1 week ago

Got it.

laserlab commented 6 days ago

no fixes, not merging