Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Open

bar #68

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions place.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,28 @@ def draw_star(size, x, y):
forward(small_circle*2)
penup()

def bar_graph(var1, value):
var1.begin_fill()
var1.left(90)
var1.forward(value)
var1.write(" " + str(value))

var1.right(90)
var1.forward(40)
var1.right(90)
var1.forward(value)
var1.left(90)
var1.end_fill()
var1.forward(10)


a = turtle.Screen()
a.bgcolor("black")
var1 = turtle.Turtle()
var1.color("green", "white")
var1.pensize(3)
measureheight = [48, 177, 200, 240, 160, 220]
for i in measureheight:
bar_graph(var1, i)

a.mainloop()