Christmas Tree Python

I made a Christmas tree in python turtle.It has random color, size, and place for the lights on the tree. I learned about how to make something random inside a triangle using variables. I made a variable and made it decrease while having the y coordinate go up. It opens up a lot more possibilities to add a nice touch to anything by using random things.

A problem that I had was figuring out the dimensions to the tree. I used variables for that too. It was challenging to figure out how to make the lights random in a triangle. If I had more time to work on it, I would add presents under the tree.

Click here for my project.

Python Turtle Maze

We did a random maze in python turtle. There was a maze that is random every time. One time the entrance could be right at the start, the next time it could be 500 over. I was able to complete the maze around 20 minutes after I started. The maze works by going a random amount, called r1, and then the pen goes up, then it draws another random amount related to r1 called t1. Then it puts the pen down and draws t1 again. I completed the maze the first time by having it go r1+t1/2 to get me to the middle of the opening. Then the maze repeats the same line only opposite. Then I go back r1-t1 to again put me in the middle of the opening. Then I go back to the wall and then the repeat goes to another round. The other way I finished it was by using goto commands. I did -400+r1+t1 because you start at -400 for the x coordinate. Then, you just do the exact opposite for the next line and repeat that. My only challenge was to have it not bounce off the wall and I completed that by doing the goto command. Click here for my project.