파이썬 GUI, 넘파이 연습
1. 움직이는 애니메이션 공 프로그램을 작성하시오. ''' 움직이는 애니메이션 공 프로그램을 작성하시오. ''' from tkinter import* import random import time window = Tk() canvas = Canvas(window, width=600, height=400) canvas.pack() class Ball(): def __init__(self, color, size): self.id = canvas.create_oval(0, 0, size, size, fill=color) self.dy = random.randint(1,10) self.dx = random.randint(1, 10) self.dz = random.randint(1, 10) ball1 = Ball..
더보기