ChatGPT
-
tkinter & socketPYTHON(파이썬)/TKINTER & KIVY 2024. 10. 29. 05:15
테스트 SAMPLE PROGRAM########################################### eIOT - IF Main# Date : 2023.5.4 By: EPLUS##########################################import tkinterfrom datetime import datetimeimport timeimport socketfrom _thread import *#################################### 함수 정의 ---###################################def cmdClose(): quit() def displayMsg(window, smsg): now = time.s..
-
ChatGPT Canvas로 5분만에 만든 게임PYTHON(파이썬)/PYGAME(GAME) 2024. 10. 13. 06:01
# pip install pygameimport pygame import time import random # 초기화 pygame.init() # 색상 정의 white = (255, 255, 255) # 배경 색상 black = (0, 0, 0) # 뱀 색상 red = (213, 50, 80) # 게임 종료 메시지 색상 green = (0, 255, 0) # 먹이 색상 blue = (50, 153, 213) # 점수 색상 # 화면 크기 설정 width = 600 height = 400 display = pygame.display.set_mode((width, height)) # 게임 화면 생성 pygame.display.set_caption('Snake Game') # 게임 제목 설정 clo..