Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2fad052

Browse files
committed
tests pass
1 parent 0a068a1 commit 2fad052

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

19_wod/wod.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,14 @@ def main():
6767
num = args.num
6868
easy = args.easy
6969

70-
# print(f'seed is {seed}')
7170
random.seed(args.seed)
72-
oefeningen = read_csv(filename)
7371

74-
# pprint(list(oefeningen))
72+
oefeningen = random.sample(read_csv(filename), k=num)
7573

7674
combined = lambda oef: load_level(calc_number(oef), easy)
7775
exercises = list(map(combined, oefeningen))
7876

79-
# pprint(exercises)
80-
81-
print(tabulate(random.sample(exercises, k=num), headers=('Exercise', 'Reps')))
77+
print(tabulate( exercises, headers=('Exercise', 'Reps')))
8278

8379
def load_level(oef, easy):
8480

@@ -101,7 +97,7 @@ def read_csv(bestand):
10197

10298
reader = csv.DictReader(bestand, delimiter=',')
10399

104-
return map(convert, reader)
100+
return list(map(convert, reader))
105101

106102

107103
def convert(line):

0 commit comments

Comments
 (0)