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

Create exercise with gcd #22

Open
exoji2e opened this issue Feb 14, 2018 · 1 comment
Open

Create exercise with gcd #22

exoji2e opened this issue Feb 14, 2018 · 1 comment
Labels

Comments

@exoji2e
Copy link
Collaborator

exoji2e commented Feb 14, 2018

Görel wants an exercise where a function for calculating gcd is created. This will be used in a turtle graphics exercise.

I guess we need a small description + proof for Euclid's algorithm, and a little bit of boilerplate code for an iterative solution.

Maybe the exercise can include some fractional numbers that needs to be reduced as well.

@gorelhedin
Copy link
Contributor

@ahnlabb I use gcd in the Piece-of-Cake exercise, see https://lunduniversity.github.io/schoolprog/exercises/piece-of-cake/, but in a way that is independent of a dedicated gcd exercise - I simply give them some code for gcd. It would still be good with a separate gcd exercise that focuses on them understanding how and why gcd works, and perhaps exploring different algorithms for computing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants