-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf.2
More file actions
77 lines (74 loc) · 2.21 KB
/
Copy pathf.2
File metadata and controls
77 lines (74 loc) · 2.21 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from tkinter import *
from tkinter import messagebox
total=float(0.00)
room=""
add=""
class winFinish():
def __init__(self):
win = Tk()
win.title("Fortune's Vacation Resort")
global total
global room
global add
total=0.00
win.geometry('500x750')
frame = Frame(win,height=500,width=750,bg="maroon")
frame.pack()
OpO = Frame(frame,height=100,width=250,bg="blue")
OpO.pack()
OpO.place(relx=.5,rely=.25,anchor=CENTER)
btn =Checkbutton(frame, text='Studio', command=Studio)
btn.pack()
btn.place(relx=0.25, rely=0.5, anchor=CENTER)
bt = Checkbutton(frame, text='1 Bedroom', command=OneBed)
bt.pack()
bt.place(relx=0.5, rely=0.5, anchor=CENTER)
bn = Checkbutton(frame, text='2 Bedroom', command=TwoBed)
bn.pack()
bn.place(relx=.75, rely=0.5, anchor=CENTER)
ck = Checkbutton(frame, text="+Lake View", command=Lk)
ck.pack()
ck.place(relx=.5, rely=.65, anchor=CENTER)
tx=Text(OpO,height=2,width=25)
tx.pack
tx.insert(END,"Fortune's Vacation Resort")
tx.place(relx=.5,rely=.5,anchor=CENTER)
cl=Button(frame,text="Cancel",command=lambda: quit(win))
cl.pack()
cl.place(relx=.75,rely=.75)
btnMess=Button(frame,text="Reserve Cabin",command=lambda: hello(" $"))
btnMess.pack()
btnMess.place(relx=.25,rely=.75,anchor=CENTER)
win.mainloop()
def OneBed():
global total
global room
total=total+350.00
room=room+" One Bed "
def TwoBed():
global total
global room
total=total+400.00
room=room+" Two Bed "
def Studio():
global total
global room
total=total+300.00
room=room+" Studio "
def Lk():
global total
global add
total=total+50.00
add="with a Lake View "
def quit(w):
w.destroy()
def hello(butMess):
global total
global room
global add
messagebox.showinfo("Amount Due","Your reservation is for "+room+add+" Your total per week comes to"+butMess+str(total))
print("Your total is",total)
print("Your reservations are for",room,add)
def mainloop():
winS = winFinish()
mainloop()