19 lines
553 B
Python
19 lines
553 B
Python
|
from random import shuffle
|
||
|
|
||
|
def print_auslosung(title, studdict):
|
||
|
studentslist = list(range(len(studdict)))
|
||
|
shuffle(studentslist)
|
||
|
print("== {} ==".format(title))
|
||
|
i = 1
|
||
|
for num in studentslist:
|
||
|
print("{} - {}".format(i, studdict[num+1]))
|
||
|
i += 1
|
||
|
print("---")
|
||
|
return True
|
||
|
|
||
|
studentsdict1 = {1: "Simon", 2: "Maximilian", 3: "Hannah", 4: "Laura", 5: "Clara"}
|
||
|
studentsdict2 = {1: "Vanessa", 2: "Pascal", 3: "Oliver"}
|
||
|
|
||
|
print_auslosung("17.12.2021", studentsdict1)
|
||
|
print_auslosung("21.12.2021", studentsdict2)
|