Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Add Python3 code to Verlet #146

wants to merge 3 commits into from

Conversation

HugoGranstrom
Copy link

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.

@Gathros Gathros added the Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.) label Jun 28, 2018
@Butt4cak3
Copy link
Contributor

Let's wait with this until #141 is resolved.

@leios leios mentioned this pull request Jun 29, 2018
Copy link
Contributor

@Butt4cak3 Butt4cak3 left a 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" %}
Copy link
Contributor

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.

@Butt4cak3 Butt4cak3 self-assigned this Jun 29, 2018
@HugoGranstrom
Copy link
Author

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?

@leios
Copy link
Member

leios commented Jun 30, 2018

Yeah, get to it when you have time! Thanks for contributing!

@HugoGranstrom
Copy link
Author

@leios thank you sir :-) Hopefully I won't be leaving AAA for a long time ;-)

@HugoGranstrom
Copy link
Author

I just noticed that the old python2 version of verlet was changed yesterday to python3. I guess I should closed this one then?

@Butt4cak3
Copy link
Contributor

Butt4cak3 commented Jun 30, 2018

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!

@Butt4cak3 Butt4cak3 closed this Jun 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants