Skip to content
Closed
Changes from 2 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
9 changes: 9 additions & 0 deletions Week03/weighted_fevzi_bagriacik.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import random

def weighted_srs():
population = ["Ali", "Ayşe", "Fatma", "Kazım", "Mehmet"]
weight = [20, 20, 20, 20, 20]
k = 3
return random.choices(population, weight, k=k)

print(weighted_srs())
Loading