Advertisement
EmmettMilligan

File Import and Random Word

Mar 10th, 2020
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. from graphics import*;
  2. import random;
  3. win = GraphWin("words", 1000, 500)
  4. win.setBackground("white")
  5.  
  6. while True:
  7. time.sleep(0.1)
  8. r=random.randint(0,255)
  9. rg=random.randint(0,255)
  10. b=random.randint(0,255)
  11. emmett = color_rgb(r,rg,b)
  12. fc = open('Txt.txt','r')
  13. w = fc.readlines()
  14. for x in w:
  15. xx = random.randint(0,1000)
  16. yy = random.randint(0,500)
  17. x = Text(Point(xx,yy), x)
  18. x.setFill(emmett)
  19. x.draw(win)
  20. win.getMouse()
  21. win.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement