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_rukiye_ilhan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
student_id="210315038"
full_name="Rukiye İlhan"
4 changes: 4 additions & 0 deletions Week02/types_rukiye_ilhan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
my_int = 7
my_float = 7.7
my_bool = False
my_complex = 7j
7 changes: 7 additions & 0 deletions Week03/pyramid_rukiye_ilhan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def calculate_pyramid_height(number_of_blocks):
used_block = 0
height = 0
while(number_of_blocks - used_block > height):
height = height + 1
used_block = (height*(height + 1)//2)
return height
20 changes: 20 additions & 0 deletions Week03/sequences_rukiye_ilhan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
def remove_duplicates(seq: list):
for index, number in enumerate(seq):
while seq.count(number) > 1:
seq.remove(number)

return seq

def list_counts(seq: list):
dict = {}
for index, number in enumerate(seq):
dict.update({number: seq.count(number)})

return dict

def reverse_dict(d: dict):
new_dict = {}
for key, value in d.items():
new_dict.update({value:key})

return new_dict
Empty file.