-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Ohm's Law algorithm added #3934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank god i made my first ever github contribution, i was very difficult for a beginner, but i did it, jus please review it and merged it i will more happy if you will merged it thanks. |
Co-authored-by: xcodz-dot <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
But cclauss thank you so much showing interest in my code before you nobody even tell me the problems with my code thank you again and i will be add these changes as you tell me . |
So i got it what you suggest me is
|
If this really needs a new directory then I think it should be Thinking about it, we can keep the number of directories same by putting the |
There are tons of quantum algorithms that have nothing to do with physics. |
I would be OK with adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fast-fail.
electronics/ohms_law.py
Outdated
result = {"voltage": float(current * resistance)} | ||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply remove variables that are created on one line and then deleted on the next line.
result = {"voltage": float(current * resistance)} | |
return result | |
return {"voltage": float(current * resistance)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we cast as float()
on this branch but not on the other two branches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because if you divide two values its gives you float but not in case for the multiplication , and remember i give return type float in type hint
electronics/ohms_law.py
Outdated
result = {"current": voltage / resistance} | ||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = {"current": voltage / resistance} | |
return result | |
return {"current": voltage / resistance} |
electronics/ohms_law.py
Outdated
result = {"resistance": voltage / current} | ||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = {"resistance": voltage / current} | |
return result | |
return {"resistance": voltage / current} |
It seems that the |
There's also This is my proposal:
|
And now i think you may don't want to add my contribution because i saw other PR just simple and you see it and just merged without any exception but with my case you nearly figured out every small detail, i don't think this is a great place for beginner to start with that's not the way to teach a beginner its just like you are boss and i am your employ, finally i just say what i realize is you have specific problem with me. |
Very disappointment not expecting from a person who has lot's of experience, i expecting kindness and good teaching attitude but not always people are good |
@erdum I think this PR is extremely close to being landed. I know it is a lot of work but we have a great repo here because we sweat the details. We were seriously overwhelmed by Hacktoberfest so we might have let thru things that were not at the highest level of quality but that is the exception, not the rule. Thanks massively for your hard work and patience. |
@cclauss if you all say to me before then i am not going to comment that but sorry if my words hutt you but i jus lost my patience . |
Patience is a fragile thing. Your algorithm is now part of the repo. Thanks for that! |
I am beginner to github its my first time ever contribution i don't even about the CI for testing my code i figured out by my own how to solve issue because my checks are failing but in first time i jus understand that the more your code is clean then more your code is to be good |
Agreed. Our high standards make this a difficult repo for beginners to contribute to but we are trying to help people to quickly learn things like testing, type hints, good variable names, f-strings because they can make code more readable and more reliable. Other repos can be easier to contribute to but this repo tries to teach best practices. |
yes I learned a lot from you and your repo thanks |
The thing that I love is that this is not my repo... It is our repo. Now that your algorithm is in the repo, you are part of the club. The |
Yes my next goal will be on kcl law, it is complicated so i will try to run it locally then i will make PR so you can test or debug my code |
Now i realize you are a very nice person actually, so sorry for the previous comments |
* New algorithm added * Errors resolvedc * New Algorithm * New algorithm added * Added new algorithm * work * New algorithm added * Hope this is final * Update electronics/ohms_law.py Co-authored-by: xcodz-dot <[email protected]> * update decimal value & negative value test * update as cclauss suggest * Update electronics/ohms_law.py Co-authored-by: Christian Clauss <[email protected]> * updated as suggested by cclauss * update as suggested by cclauss * Update as suggested by cclauss * Update ohms_law.py Co-authored-by: xcodz-dot <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
* New algorithm added * Errors resolvedc * New Algorithm * New algorithm added * Added new algorithm * work * New algorithm added * Hope this is final * Update electronics/ohms_law.py Co-authored-by: xcodz-dot <[email protected]> * update decimal value & negative value test * update as cclauss suggest * Update electronics/ohms_law.py Co-authored-by: Christian Clauss <[email protected]> * updated as suggested by cclauss * update as suggested by cclauss * Update as suggested by cclauss * Update ohms_law.py Co-authored-by: xcodz-dot <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
* New algorithm added * Errors resolvedc * New Algorithm * New algorithm added * Added new algorithm * work * New algorithm added * Hope this is final * Update electronics/ohms_law.py Co-authored-by: xcodz-dot <[email protected]> * update decimal value & negative value test * update as cclauss suggest * Update electronics/ohms_law.py Co-authored-by: Christian Clauss <[email protected]> * updated as suggested by cclauss * update as suggested by cclauss * Update as suggested by cclauss * Update ohms_law.py Co-authored-by: xcodz-dot <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
* New algorithm added * Errors resolvedc * New Algorithm * New algorithm added * Added new algorithm * work * New algorithm added * Hope this is final * Update electronics/ohms_law.py Co-authored-by: xcodz-dot <[email protected]> * update decimal value & negative value test * update as cclauss suggest * Update electronics/ohms_law.py Co-authored-by: Christian Clauss <[email protected]> * updated as suggested by cclauss * update as suggested by cclauss * Update as suggested by cclauss * Update ohms_law.py Co-authored-by: xcodz-dot <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
Describe your change:
Finnaly i did it now i hope all checks should be clear
Checklist:
Fixes: #{$ISSUE_NO}
.