Advertisement
Enrro

Test1 clase de segio

Sep 9th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. from Tkinter import*
  2.  
  3. def RectanguloRojo(x,y):
  4. ventana = Tk()
  5. lienzo =Canvas(ventana, width=400, height=400)
  6. lienzo.pack()
  7. lienzo.create_rectangle(x,y, x+20,y+20, fill = "red", width = 0)
  8. lienzo.create_oval(x,y-30,x+20,y-10, fill = "blue", width = 0)
  9. mainloop()
  10. def TaxCal(costo):
  11. print("Buenos dias. Calcularemos taxes :V")
  12. return (costo*.15)
  13. def chatDial(posy,posx, texto):
  14. ventana = Tk()
  15. lienzo =Canvas(ventana, width=400, height=400)
  16. lienzo.pack()
  17. lienzo.create_rectangle(posx,posy, posx+100,posy+50, fill = "blue" , outline = "blue")
  18. lienzo.create_polygon(posx,posy+30,
  19. posx-10,posy+40,
  20. posx,posy+50,
  21. fill = "blue" , outline = "blue")
  22. lienzo.create_text(posx+20,posy+30, text = texto, font='impact')
  23. mainloop()
  24. def drawCircle(x,y):
  25. ventana = Tk()
  26. lienzo =Canvas(ventana, width=400, height=400)
  27. lienzo.pack()
  28. lienzo.create_oval(x-30,y-30,x+30,y+30, fill = "#5BA0FF", outline = "black")
  29. lienzo.create_oval(x-20,y-20,x+20,y+20, fill= "#5BA0FF", outline ="black")
  30. lienzo.create_line(x,y,x+200,y)
  31. lienzo.create_oval(x-30+200,y-30,x+30+200,y+30, fill = "#5BA0FF", outline = "black")
  32. lienzo.create_oval(x+180,y-20,x+220,y+20, fill= "#5BA0FF", outline ="black")
  33. mainloop()
  34. def primeraLetra(texto):
  35. print(texto[0])
  36.  
  37. primeraLetra("Edgar")
  38.  
  39. #drawCircle(100,200)
  40. #RectanguloRojo(299,300)
  41. #print( TaxCal (1000))
  42. #chatDial(0,20,"dos")
  43.  
  44. '''def drawCircles(cx,cy):
  45. ventana = Tk()
  46. lienzo =Canvas(ventana, width=400, height=400)
  47. lienzo.pack()
  48. lienzo.create_oval(cx*1.15,85,cy/15,115)
  49. lienzo.create_line(cx,100,cy,100)
  50. mainloop()
  51. '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement