Created
November 3, 2018 21:16
-
-
Save khebbie/4ee03c9d9a7a98b92c8a51c1902acd3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"for to tal a og b findes der en største divisor kaldet (a,b)\n", | |
"Den største fælles divisor for 12 og 8 er: 4\n" | |
] | |
} | |
], | |
"source": [ | |
"print(\"for to tal a og b findes der en største divisor kaldet (a,b)\")\n", | |
"a=12\n", | |
"b=8\n", | |
"a_1=a\n", | |
"b_1=b\n", | |
"r=50000000\n", | |
"while r!=0:\n", | |
" r=a%b\n", | |
" a=b\n", | |
" b=r\n", | |
"print(\"Den største fælles divisor for \", a_1, \"og \", b_1, \"er: \", a)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Dette er en overskrift\n", | |
"Det ovenstående program har Gurger lavet" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.6" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment