Advertisement
ZEdKasat

Chapter 5

Feb 26th, 2022
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. age = 10
  2. weight = 22.6
  3. name = "Bruce"
  4.  
  5.  
  6. colors = ["red", "green", "blue"]
  7.  
  8. marks = [12, 28, 122, 91, 89]
  9.  
  10. # random_values = ["red", 12, 90.2, [12, 89, "penguin"]]
  11. # print(age)
  12. # print(weight)
  13. # print(name)
  14. # print(colors)
  15.  
  16. # print(colors[2])
  17. # print(colors[-1])
  18.  
  19.  
  20. # for x in colors:
  21. #     print(x)
  22.  
  23. # for x in "colors":
  24. #     print(x)
  25.  
  26. # s = 0
  27. # for m in marks:
  28. #     s += m     # s = s + m
  29. #     print(s)
  30.  
  31.  
  32. colors = ["red", "green", "blue"]
  33.  
  34. from turtle import *
  35.  
  36. tom = Turtle()
  37. tom.speed(8)
  38. tom.pensize(4)
  39.  
  40. # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  41. for x in range(10):
  42.     tom.color(colors[x%3])
  43.     tom.circle(x*10+10)
  44.  
  45. done()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement