Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- root=Tk()
- tex=Text(root, height=23, width=49,bg='black',font='System',fg='white',bd=0)
- tex.place(x=3,y=25)
- i=1
- z=7
- n=3
- d=4
- a=5
- for i in range(z):
- text=('A',i+2,'=','(',n,'- 1)','*',d,'+',a)
- tex.insert('2.2',text,)
- root.mainloop()
- for i in range(z):
- text=('A',i+2,'=','(',n,'- 1)','*',d,'+',a)
- tex.insert('2.2','{}n'.format(text))
- #!/usr/bin/env python3
- from tkinter import Tk, Text
- root = Tk()
- text = Text(root, height=23, width=49, bg='black', font='System',fg='white',bd=0)
- text.place(x=3, y=25)
- n, d, a = 3, 4, 5
- for i in range(7):
- text.insert('end', f'A{i+2} = ({n} - 1) * {d} + {a}n')
- root.mainloop()
- #!/usr/bin/env python3
- from tkinter import Tk, Text
- root = Tk()
- text = Text(root, height=23, width=49, bg='black', font='System',fg='white', bd=0)
- text.place(x=3, y=2)
- def replace_text(i, n=3, d=4, a=5):
- text.delete("1.0", 'end')
- text.insert("1.0", f'A{i+2} = ({n} - 1) * {d} + {a}')
- if i < 6:
- text.after(500, replace_text, i+1) # replace the next line in .5 seconds
- replace_text(0)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement