Facebook
From Roko, 1 Month ago, written in Plain Text.
This paste is a reply to Re: Python from Roko - view diff
Embed
Download Paste or View Raw
Hits: 148
  1. #COMANDA
  2. def b():
  3.     dulj=float(textbox1.get())
  4.     šir=float(textbox2.get())
  5.     vis=float(textbox3.get())
  6.     vol=round(dulj*šir*vis,2)
  7.     rez = Label(a,text = "Volumen kvadrata je: " +str(vol))
  8.     rez.place(x = 350, y=350)
  9.  
  10.  
  11.    
  12.  
  13.    
  14. #/////////////////////////////////////////////////
  15.              
  16.  
  17. #labels
  18.  
  19. #1.
  20. ispis = Label(a, text = "duljina" , bg = "black"
  21.               , fg="white", font=("Arial",12))
  22. ispis.place(x =50, y=50)
  23.  
  24. #2.
  25. ispis = Label(a, text = "širina" , bg = "black"
  26.               , fg="white", font=("Arial",12))
  27. ispis.place(x =50, y=100)
  28. #3.
  29. ispis = Label(a, text = "visina" , bg = "black"
  30.               , fg="white", font=("Arial",12))
  31. ispis.place(x =50, y=150)
  32. #4.
  33. ispis = Label(a, text = "Hello world" , bg = "black"
  34.               , fg="white", font=("Arial",12))
  35. ispis.place(x =50, y=200)
  36.  
  37. #entrys:
  38.  
  39. #1
  40. textbox1 = Entry(a,width=12)
  41. textbox1.place(x =200, y=50)
  42.  
  43. #2
  44. textbox2 = Entry(a,width=12)
  45. textbox2.place(x =200, y=100)
  46.  
  47. #3
  48. textbox3 = Entry(a,width=12)
  49. textbox3.place(x =200, y=150)
  50.  
  51. #GUMB
  52.  
  53. #1
  54. gumb2=Button(a,text="izracunja volumen", command=b)
  55. gumb2.place(x=180,y=300,width=120)
  56.  
  57.  
  58.