File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ import random
2+ import time
3+
4+ names = """나이스1
5+ 나이스2
6+ 나이스3
7+ 나이스4
8+ 나이스5
9+ 나이스6
10+ 나이스7
11+ 나이스8
12+ 나이스9
13+ 나이스10
14+ 나이스11
15+ 나이스12
16+ 나이스13
17+ 나이스14
18+ 나이스15
19+ 나이스16
20+ 나이스17
21+ 나이스18
22+ 나이스19
23+ 나이스20
24+ 나이스21
25+ 나이스22
26+ 나이스23
27+ 나이스24
28+ 나이스25"""
29+
30+ arr = names .split ("\n " )
31+ cnt = len (arr )
32+
33+ lottery_cnt = 5 #추첨 인원
34+ lottery_name = []
35+ for i in range (lottery_cnt ):
36+ random .shuffle (arr )
37+ random .shuffle (arr )
38+ random .shuffle (arr )
39+ for i in range (100 ):
40+ print (f"\r { i } " , end = '' )
41+ time .sleep (0.03 )
42+
43+ s = arr .pop ()
44+ lottery_name .append (s )
45+ print (f"\r 추첨 --> { s } " )
46+ time .sleep (3 )
47+
48+ print ()
49+ print ("*" * 20 )
50+ print ("선물 당첨자 명단" )
51+ print ("*" * 20 )
52+ no = 1
53+ for i in lottery_name :
54+ print (no , ":" , i )
55+ no += 1
You can’t perform that action at this time.
0 commit comments