This file contains 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
__author__ = 'user' | |
q2y = {"작작먹어": "end"} | |
q2n = {"채소 좀 먹어": "end"} | |
q3y = {"고기 좀 먹어": "end"} | |
q3n = {"아무거나 좀 먹어": "end"} | |
q1y = {"고기를 먹을때 채소랑 같이 먹는가? (y/n)": [q2y, q2n]} | |
q1n = {"당신은 채소를 좋아합니까? (y/n)": [q3y, q3n]} | |
Dic = {"당신은 고기를 좋아하는가? (y/n)": [q1y, q1n]} |
This file contains 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
__author__ = 'user' | |
string = "0123456789ABCDEF" | |
Q = list() | |
userInput = input("Input : ") | |
while (True): | |
Q.append(int(userInput) & 0xf) | |
userInput = int(userInput) >> 4 | |
if (int(userInput) == 0): |
This file contains 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
__author__ = 'user' | |
q2y = {"작작먹어": "end"} | |
q2n = {"채소 좀 먹어": "end"} | |
q3y = {"고기 좀 먹어": "end"} | |
q3n = {"아무거나 좀 먹어": "end"} | |
q1y = {"고기를 먹을때 채소랑 같이 먹는가? (y/n)": [q2y, q2n]} | |
q1n = {"당신은 채소를 좋아합니까? (y/n)": [q3y, q3n]} | |
Dic = {"당신은 고기를 좋아하는가? (y/n)": [q1y, q1n]} |
This file contains 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
__author__ = '보운' | |
from random import * | |
def initDic(): | |
returnDic = {} | |
for i in range(1, 46): | |
tempDic = {i: 0} | |
returnDic.update(tempDic) | |
return returnDic |
This file contains 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
import os | |
import sys | |
targetFile = open("C:\\test\\diary.txt", "r", encoding="utf-8") | |
count = 0 | |
text = list(str(targetFile.readlines()).upper()) | |
str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
for x in str1: |
This file contains 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
import random | |
for x in range(1,1001): | |
ballList = [] | |
while(len(ballList)<6): | |
ballList.append(random.randrange(1,46)) | |
ballList = list(set(ballList)) | |
ballList.sort() | |
print( x," 번째 : ", ballList) |