Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Commit 1ecf8d2

Browse files
committed
new
1 parent 4a8478a commit 1ecf8d2

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

01-data-model/mytests.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def lenbyo(x):
2+
if x.count("o") == 0:
3+
ln = 0
4+
else:
5+
ln = len(x)/x.count("o")
6+
return ln
7+
8+
9+
print(list(map(lenbyo, ["cos","wodnik","kolorowanka", "kiermasz"])))
10+
11+
print(list(map(sum,zip([1,2,3],[5,3,2]))))

01-data-model/vector2d.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,16 @@ def mypow(x,y):
5454
y = "okok"
5555

5656
if x is y:
57-
print("ok")
57+
print("ok")
58+
59+
def lenbyo(x):
60+
if x.count("o") == 0:
61+
ln = 0
62+
else:
63+
ln = len(x)/x.count("o")
64+
return ln
65+
66+
67+
print(list(map(lenbyo, ["cos","wodnik","kolorowanka", "kiermasz"])))
68+
69+
print(list(map(sum,zip([1,2,3],[5,3,2]))))

0 commit comments

Comments
 (0)