-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path00_start.py
More file actions
50 lines (41 loc) · 911 Bytes
/
Copy path00_start.py
File metadata and controls
50 lines (41 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# print("hihi")
import random
# 학생 리스트
students = [
"권기남",
"김광성",
"김승현",
"김윤식",
"김주성",
"민예린",
# "박선민",
"박소리",
"박수빈",
"박수현",
"신효진",
"양다희",
"이유진",
"이주현",
"임서영",
"장윤서",
"조중석",
"최민혁",
"최시언",
"황다인",
"황성진"
]
def create_teams_with_size(students, team_size):
# 학생 목록을 섞기
random.shuffle(students)
teams = []
for i in range(0, len(students), team_size):
team = students[i:i + team_size]
teams.append(team)
return teams
# 팀 인원 설정
TEAM_SIZE = 2
# 랜덤 팀 생성
random_teams = create_teams_with_size(students, TEAM_SIZE)
# 결과 출력
for i, team in enumerate(random_teams, 1):
print(f"팀 {i}: {', '.join(team)}")