I'm still new to python and programming in general and it's my first post here. I'm trying to draw a "house" shape with an X inside of it. I need to utilize a loop with a list that contains tuples which would be forward,left respectively. I figured what coordinates I would need to draw the house but I can't utilize them to make the turtle move. It's a school assignment. I'm attaching everything I got so far. Any insights would be highly appreciated, thank you so much!
def drawhouse(t, ls):
fwd, lt = ls
for fwd, lt in ls:
t.forward(fwd)
t.left(lt)
def main():
import turtle
wn = turtle.Screen()
t = turtle.Turtle()
wn.bgcolor("Cyan")
wn.title("Drawing a house")
wn.mainloop()
ls = [(100, 90), (100, 90), (100, 240), (100, 240),
(100, 285), (140, 225), (100, 225), (100, 0)]
drawhouse(t, ls)
main()
Hope that the formatting for the code is right(seems to be on the preview) Thanks in advance.