Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Tkinter import*
- def RectanguloRojo(x,y):
- ventana = Tk()
- lienzo =Canvas(ventana, width=400, height=400)
- lienzo.pack()
- lienzo.create_rectangle(x,y, x+20,y+20, fill = "red", width = 0)
- lienzo.create_oval(x,y-30,x+20,y-10, fill = "blue", width = 0)
- mainloop()
- def TaxCal(costo):
- print("Buenos dias. Calcularemos taxes :V")
- return (costo*.15)
- def chatDial(posy,posx, texto):
- ventana = Tk()
- lienzo =Canvas(ventana, width=400, height=400)
- lienzo.pack()
- lienzo.create_rectangle(posx,posy, posx+100,posy+50, fill = "blue" , outline = "blue")
- lienzo.create_polygon(posx,posy+30,
- posx-10,posy+40,
- posx,posy+50,
- fill = "blue" , outline = "blue")
- lienzo.create_text(posx+20,posy+30, text = texto, font='impact')
- mainloop()
- def drawCircle(x,y):
- ventana = Tk()
- lienzo =Canvas(ventana, width=400, height=400)
- lienzo.pack()
- lienzo.create_oval(x-30,y-30,x+30,y+30, fill = "#5BA0FF", outline = "black")
- lienzo.create_oval(x-20,y-20,x+20,y+20, fill= "#5BA0FF", outline ="black")
- lienzo.create_line(x,y,x+200,y)
- lienzo.create_oval(x-30+200,y-30,x+30+200,y+30, fill = "#5BA0FF", outline = "black")
- lienzo.create_oval(x+180,y-20,x+220,y+20, fill= "#5BA0FF", outline ="black")
- mainloop()
- def primeraLetra(texto):
- print(texto[0])
- primeraLetra("Edgar")
- #drawCircle(100,200)
- #RectanguloRojo(299,300)
- #print( TaxCal (1000))
- #chatDial(0,20,"dos")
- '''def drawCircles(cx,cy):
- ventana = Tk()
- lienzo =Canvas(ventana, width=400, height=400)
- lienzo.pack()
- lienzo.create_oval(cx*1.15,85,cy/15,115)
- lienzo.create_line(cx,100,cy,100)
- mainloop()
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement