Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle as tt
- import random
- words = ["apple", "happy", "surprise", "leagueoflegends", "overwatch", "maplestory", "battleground"]
- word = words[random.randint(0, 6)]
- count = 0
- print(word)
- ui = tt.Pen()
- answer = tt.Pen()
- answer.hideturtle()
- answer.up()
- #UI 그리기
- ui.speed(5)
- ui.up()
- ui.goto(-500, 350)
- ui.down()
- ui.fd(1000)
- ui.rt(90)
- ui.fd(700)
- ui.rt(90)
- ui.fd(1000)
- ui.rt(90)
- ui.fd(700)
- ui.up()
- ui.goto(-150, -350)
- ui.seth(90)
- ui.down()
- ui.fd(400)
- ui.rt(90)
- ui.fd(150)
- ui.rt(90)
- ui.fd(150)
- ui.up()
- for i in range(len(word)):
- ui.seth(0)
- ui.goto(-400 + i * 80, 250)
- ui.down()
- ui.fd(50)
- ui.up()
- ui.fd(30)
- #게임 진행
- while(count < 6):
- guess = input("알파벳 하나(여러개를 입력하면 첫번째 것만 인식합니다) : ")
- for i in range(len(word)):
- if(guess[0] == word[i]):
- answer.goto(-400 * i, 260)
- answer.down()
- answer.write(guess[0])
- answer.up()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement