Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Week01/info_recepgoktug_avci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
student_id = "220316021"
full_name = "Recep Göktuğ Avcı"
4 changes: 4 additions & 0 deletions Week02/types_recepgoktug_avci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
my_int = 23
my_float = 19.07
my_bool = True
my_complex = 3+4j
11 changes: 11 additions & 0 deletions Week03/pyramid_recepgoktug_avci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def calculate_pyramid_height(number_of_blocks):
height = 0
current_layer_blocks = 1

while number_of_blocks >= current_layer_blocks:
number_of_blocks -= current_layer_blocks
height += 1
current_layer_blocks += 1

return height

15 changes: 15 additions & 0 deletions Week03/sequences_recepgoktug_avci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
def remove_duplicates(seq: list) -> list:

return list(set(seq))

def list_counts(seq: list) -> dict:

counts = {}
for item in seq:

counts[item] = counts.get(item, 0) + 1
return counts

def reverse_dict(d: dict) -> dict:

return {value: key for key, value in d.items()}