Posts

Showing posts from August, 2020

Python Slider

  from  tkinter  import * import  tkinter.messagebox  as  tmsg root=Tk() root.title( "My Slider" ) root.geometry( "750x450" ) # myslider=Scale(root, from_=0, to=450) # myslider.pack() def   getdollor ():      print  ( f "We have credit  { myslider2.get() }  $ in your account" )     tmsg.showinfo( "Amount Credited!" ,  f "We have credited  { myslider2.get() }  $ in your account." )      f= open ( "file3.txt" ,  "w" )     a=f.write( f " { myslider2.get() }  $ credited in your account. \n " )      with   open ( "file3.txt" ,  "a" )  as  f:         f.write( f "Thanks for giving rate us >>>   { name_value.get() } " )      Label(root, text = "How many dolor do you want" ).pack() myslider2=Scale(root,  from_ = 0 ,  to = 450 ,  orient =HORIZONTAL) myslider2.set( 0 ) myslider2.pack() Label(root, text = "Please give us rate from 1 to 10" ).pack() name_value=S

Notepad software with Python

  from  tkinter  import * import  tkinter.messagebox  as  tmsg root=Tk() root.geometry( "700x500" ) root.title( "My Notepad" ) def   myfunc ():      print ( "I am visual studio code" ) def   help ():     tmsg.showinfo( "Help" ,  "www.elalita.com" ) def   rate ():      # print("Rate Us")     value=tmsg.askquestion( "Was your experiance good" )      print (value)      if  value== "yes" :         msg= "Great Please rate us on www.elalita.com"      else :         msg= "thansk for suggation, we resolve the problem"     tmsg.showinfo( "Experiance" , msg)      yourmenubar=Menu(root) m1=Menu(yourmenubar) m1.add_command( label = "New Project" ,  command =myfunc) m1.add_command( label = "Save" ,  command =myfunc) m1.add_command( label = "Save As" ,  command =myfunc) m1.add_separator() m1.add_command( label = "Print" ,  command =myfunc) m1.add_comma