We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8137d97 commit 94fabfdCopy full SHA for 94fabfd
retio.py
@@ -0,0 +1,12 @@
1
+def greatestCommonFactor(whiteC, redC):
2
+ return whiteC if(redC == 0) else greatestCommonFactor(redC, whiteC % redC)
3
+
4
+redCorpuscles = 5000000
5
+whiteCorpuscles = 8000
6
7
+factor = greatestCommonFactor (whiteCorpuscles, redCorpuscles)
8
9
+whiteRatio = int(whiteCorpuscles/factor)
10
+redRatio = int(redCorpuscles/factor)
11
12
+print("Aspect Ratio:", whiteRatio,":",redRatio)
0 commit comments