Skip to content

Commit 037cebb

Browse files
authored
Merge pull request #231 from MelisaNurHamamci/master
Create info_melisanur_hamamci.py
2 parents 1916330 + 06b138c commit 037cebb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Week01/info_melisanur_hamamci.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
student_id = "230315061"
2+
full_name = "Melisa Nur Hamamcı"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import random
2+
def weighted_srs(data, n, weights, with_replacement=False):
3+
if with_replacement or weights:
4+
return random.choices(data, weights=weights, k=n)
5+
else:
6+
return random.sample(data,n)

0 commit comments

Comments
 (0)