Skip to content

Commit 42c65f8

Browse files
authored
Merge pull request #676 from ahmetmujde/master
week1 and week2 task added
2 parents f27b8e5 + 8863bda commit 42c65f8

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

Week01/info_ahmet_tayyip_mujde.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
student_id="200315089"
2+
full_name="Ahmet Tayyip Müjde"

Week02/types_ahmet_tayyip_mujde.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
my_int = 13
2+
my_float = 2.71828182845904523
3+
my_bool = True
4+
my_complex = 7j

Week03/pyramid_ahmet_tayyip_mujde.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def calculate_pyramid_height(blocks):
2+
height = 0
3+
required_blocks = 1
4+
5+
while blocks >= required_blocks:
6+
blocks -= required_blocks
7+
height += 1
8+
required_blocks += 1
9+
10+
return height
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def remove_duplicates(seq:list) -> list:
2+
return list(set(seq))
3+
4+
5+
def list_counts(seq: list) -> dict:
6+
counts = {}
7+
for item in seq:
8+
counts[item] = counts.get(item, 0) + 1
9+
return counts
10+
11+
12+
def reverse_dict(d: dict) -> dict:
13+
return {v: k for k, v in d.items()}

0 commit comments

Comments
 (0)