Created
September 9, 2021 11:52
-
-
Save jms080809/2f65576057221e9c8521cf5aa22db979 to your computer and use it in GitHub Desktop.
ROTTO PYTHON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#다른 사람들한테 이게 도움이 될까? 잘 모르겠네요 ㅋㅋ | |
from random import randint | |
n_list = [] | |
sel_list = [] | |
def settingList(): | |
x = 1 | |
while x < 46: | |
n_list.append({ | |
"number":x, | |
"selected":False | |
}) | |
x+=1 | |
return x | |
settingList() | |
def return_random_int(): | |
return randint(0,44) | |
def get_rotto_array(): | |
a = return_random_int() | |
if n_list[a]["selected"] != True: | |
sel_list.append(a + 1) | |
else: | |
get_rotto_array() | |
def rotto(): | |
tried=0 | |
while tried < 7: | |
get_rotto_array() | |
tried +=1 | |
print(sel_list) | |
a = input("Retry? (y/n) : ") | |
if a == "y": | |
sel_list.clear() | |
rotto() | |
else: | |
exit() | |
rotto() | |
# 심심하다아아아아아아아아아아아아아아앙 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment