-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassCode.py
More file actions
37 lines (27 loc) · 731 Bytes
/
classCode.py
File metadata and controls
37 lines (27 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'''from tkinter import *
class Window(Frame):
def init (self , master = None):
Frame.init(self , master)
self.master = master
root = Tk()
#app = Window(root)
w=Label(root, text="Hello, world")
w.pack()
root.mainloop()
'''
from graphics import *
win = GraphWin('A window with shapes') #What do things inside
center1 = Point(60,80) #What is this?
circ1 = Circle(center1 , 20) #What is this?
circ1.draw(win) #What will this do?
center1.draw(win) #What does this do?
center2 = Point (120 , 150)
circ2 = Circle(center2 , 30)
circ2.setFill('Blue')
circ2.draw(win)
label1 = Text(center1 , "White circle ")
label2 = Text(center2 , "Blue circle ")
label1.draw(win)
label2.draw(win)
win.getMouse()
win.close( )