Intro to Python Graphics

Goals:
-login to replit.com (or create a replit.com account and then login)
-write your first program in Python
-create a custom graphic using Python

Login to replit.com

Click on the create repl button in the top left corner

Choose Python (with Turtle) and name your new program like this: lastname_PythonTurtle1 (Milstead_PythonTurtle1). Then click the blue Create Repl button.

Type in these lines into your new Python program – you don’t need to add the line numbers (1, 2, 3…):

Click the RUN button and observe your masterpiece.

Here’s what happens in the code:
Lines 1 and 2 tell Python that it will be using graphics.
Line 3 draws a line that is 100 pixels long.
Line 4 turns the turtle 90 degrees to the right.
Line 5 draws a line that is 100 pixels long.
Line 6 turns the turtle 90 degrees to the right.

Now, add additional lines of code to make a square.  HINT: what lines do you repeat to make a square? Did you get errors?  Check the code for spelling and punctuation.  Try again.

Adding line color: add these two lines of code to your program after line 2:

Fill the shape with color – here’s some sample code:

Create shapes of your own design. Useful code for making your shapes is to pick the pen up, move it, and then put it down in a new location. Like this: