aboutsummaryrefslogtreecommitdiff
path: root/Semestr 3/pf/lista2/pot.py
diff options
context:
space:
mode:
authorFranciszek Malinka <franciszek.malinka@gmail.com>2021-02-25 14:42:55 +0100
committerFranciszek Malinka <franciszek.malinka@gmail.com>2021-02-25 14:42:55 +0100
commit9477dbe667f250ecd23f8fc0d56b942191526421 (patch)
treea4b50c9a726f415f835f5311c11c5d66e95f688c /Semestr 3/pf/lista2/pot.py
parent1968c1e590077bd51844eacfac722d7963848cb8 (diff)
Stare semestry, niepoukladane
Diffstat (limited to 'Semestr 3/pf/lista2/pot.py')
-rw-r--r--Semestr 3/pf/lista2/pot.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Semestr 3/pf/lista2/pot.py b/Semestr 3/pf/lista2/pot.py
new file mode 100644
index 0000000..7e86c8f
--- /dev/null
+++ b/Semestr 3/pf/lista2/pot.py
@@ -0,0 +1,7 @@
+def fun(r):
+ for i in range(r):
+ n = 2**i
+ while n > 10:
+ n //= 10
+ print(f"{i}: {2**i} {n} {'<-- ' if n == 1 else ''}")
+