123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- from Tkinter import *
- import time as t
- import turtle
- a=0
- def Info():
- info = Tk()
- w = Label(info, text="Der Nikohauszeichner wurde von Niko Hessler und Martin Mittrenga 2017 im Keller der Hochschule entwickelt...!")
- w.pack()
- root.mainloop()
- def zeichnung():
- if a==1:
- Weg1()
- master = Tk()#Fenster
- lbl=Label(master, text="Welche Variante?").grid(row=0)
- menu = Menu(master)
- master.config(menu=menu)
- filemenu = Menu(menu)
- menu.add_cascade(label="Menu", menu=filemenu)
- filemenu.add_command(label="Mitwirkende", command=Info)
- a=e1 =Entry(master)
- a=int
- e1.grid(row=0, column=1)
- Button(master, text='Quit', command=master.quit).grid(row=3, column=0, sticky=W, pady=4)
- btn=Button(master, text='Zeichnung zeigen', command=zeichnung).grid(row=3, column=1, sticky=W, pady=4)
- #mainloop( )
- def Weg1():
- turtle.reset()
- t.sleep(0.5)
- turtle.forward(100)
- t.sleep(0.5)
- turtle.left(90)
- t.sleep(0.5)
- turtle.forward(100)
- t.sleep(0.5)
- turtle.right(45)
- t.sleep(0.5)
- turtle.back(140)
- t.sleep(0.5)
- turtle.right(90)
- t.sleep(0.5)
- turtle.right(45+180)
- turtle.forward(100)
- t.sleep(0.5)
- turtle.right(90)
- turtle.forward(100)
- t.sleep(0.5)
- turtle.left(90+45)
- turtle.forward(70)
- t.sleep(0.5)
- turtle.left(90)
- turtle.forward(70)
- t.sleep(0.5)
- turtle.left(90)
- turtle.forward(140)
- t.sleep(0.5)
- master.mainloop( )
- e=menu()
- if e1==1:
- Weg1()
|