Skip to content

Commit 2af3e36

Browse files
authored
Merge pull request #6 from 777Samael/feature/maths
percent check
2 parents 4331096 + 8ebf303 commit 2af3e36

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Maths/maths_check.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# x% * y == y% * x
2+
# x/100 * y == y/100 * x
3+
4+
for x in range(1, 100):
5+
for y in range(1, 100):
6+
lewa = round(x/100 * y, 2)
7+
prawa = round(y/100 * x, 2)
8+
if not lewa == prawa:
9+
print(f"{x}% * {y} ({lewa}) <> {y}% * {x} ({prawa})")
10+
# else:
11+
# print(f"{x}% * {y} ({lewa}) = {y}% * {x} ({prawa})")

0 commit comments

Comments
 (0)