0% found this document useful (0 votes)
37 views1 page

More Turtle Challenges

Uploaded by

pchambers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

More Turtle Challenges

Uploaded by

pchambers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Created by Nichola Wilkin Ltd.

More Turtle Challenges


Look at this code:

Complete these programming challenges in Python. Remember to save


each of them with a sensible name:

Challenge 1
Change the background to pink. Draw a square with a thick green dotted
outline.

Challenge 2
Draw three triangles in a row, fill each with a different colour.

Challenge 3
Draw a pattern which will be different every time. Use the random module
(see below for tips) to pick a random number of lines, the length of each line
and the angle of each turn. You can also randomly pick the colour of the
line.
Code Description
This needs to be at the top of the
import random program, just under import turtle line is
fine.
line_length = random.randint(25,100) This will pick a random whole number
between 25 and 100.
colour = This will pick a random value from the list
random.choice([“red”,“blue”,“green”]) given.

© Nichola Wilkin Ltd 2019 Page 1


www.nicholawilkin.com

You might also like