Skip to content

Instantly share code, notes, and snippets.

@ritsubee
ritsubee / gist:c3e3cfa5397dd2e4e075310d16d50405
Created March 6, 2018 12:14
끝말잇기 게임을 만들어보쟈!
import random
w=["산기슭","발바닥","보늬","리락쿠마"]
print("[끝말잇기 게임] 준비되면 엔터! ' ㅂ')/")
input()
print("자, 내가 먼저 시작한다?\n")
q=random.choice(w)
@ritsubee
ritsubee / gist:6e0cc2452290d7b03a267df86565aa3e
Created March 6, 2018 09:39
sort는 왜 문자와 숫자가 같이 들어가면 안될까?
>>> a=[1,4,3,2,'b','a']
>>> a.sort()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '<' not supported between instances of 'str' and 'int'
@ritsubee
ritsubee / gist:bec73dd14b9725c6a68dc61092cf301e
Created March 5, 2018 15:41
정답도 오답도 같은 문제가 나오지 않게끔-
import random
import time
w=["cat","dog","fox","monkey","mouse","panda","frog","snake","wolf"]
n=1
print("[타자 게임]준비되면 엔터!")
input()
start=time.time()
import random
import time
w=["cat","dog","fox","monkey","mouse","panda","frog","snake","wolf"]
n=1
print("[타자 게임]준비되면 엔터!")
input()
start=time.time()
import random
import time
w=["cat","dog","fox","monkey","mouse","panda","frog","snake","wolf"]
n=1
print("[타자 게임]준비되면 엔터!")
input()
start=time.time()
import random
import time
w=["cat","dog","fox","monkey","mouse","panda","frog","snake","wolf"]
n=1
print("[타자 게임]준비되면 엔터!")
input()
start=time.time()
@ritsubee
ritsubee / gist:5ef29dc523a4746f363c9660183733a9
Created March 3, 2018 12:08
_tkinter.TclError: bad event type or keysym "sapce"
import turtle as t
import random
score=0
playing=False
te=t.Turtle()
te.shape("turtle")
te.color("red")
te.speed(0)
import turtle as t
import random
score=0
playing=False
te=t.Turtle()
te.shape("turtle")
te.color("red")
te.speed(0)
@ritsubee
ritsubee / cannon.py
Created March 2, 2018 08:20
NameError: name 'target' is not defined
import turtle as t
import random
def turn_up():
t.left(2)
def turn_down():
t.right(2)
def fire():