-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Add Python3 code to Verlet #146
Conversation
Let's wait with this until #141 is resolved. |
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.
Alright. Now that the issue that I mentioned is resolved, I can finally go through this PR with you.
First off, welcome to the AAA! We're happy to see you want to contribute to the project!
There's only one thing that you need to change. In issue #141 we decided to entirely drop Python 2 and that's why I need you to fix something up. See the comment below.
@@ -40,6 +40,8 @@ Here is what it looks like in code: | |||
[import:2-18, lang:"java"](code/java/verlet.java) | |||
{% sample lang="py2" %} | |||
[import:28-33, lang:"python"](code/python2/verlet.py) | |||
{% sample lang="py3" %} |
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.
We got rid of Python 2 and lang="py3"
became just lang="py"
. Just remove the "3" everyone. Don't worry about the leftover Python 2 code imports.
Alright, thank you for the review :-). I'm away from home for a couple of days and I don't have my laptop with me so I can fix this on Wednesday. Is that ok? |
Yeah, get to it when you have time! Thanks for contributing! |
@leios thank you sir :-) Hopefully I won't be leaving AAA for a long time ;-) |
I just noticed that the old python2 version of verlet was changed yesterday to python3. I guess I should closed this one then? |
Oh no, you're right. I'm so sorry. I totally didn't think of that. I'm sure you will find another cool algorithm you can implement! The timing was just a bit unfortunate because we just made a big decision regarding Python. I hope that's okay. Still, thanks for contributing! We really appreciate that you put in some work! |
There was already Python2 code included in the article but as newcomers to Python should learn Python3 it makes sense to also add Python3 code. Hope my code makes sense.
In the last example I left Stormer-Verlet out because it is just Classical Verlet but you calculate the velocity but you don't use it in this example with the falling ball.