Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PYTHON 3.6.5 QUESTION Nature Art,tuetle questions Nature Art In this Assignment

ID: 3912623 • Letter: P

Question

PYTHON 3.6.5 QUESTION Nature Art,tuetle questions

Nature Art In this Assignment 3, we are to write a Python program, called NatureArt.py, which is to create a drawing representing an outside nature scene using the Python Turtle Graphics module and its builtin functions. What do we mean by “nature scene”? We mean that our Python program can be a drawing of anything as long as all the elements can be found outside, in nature (e.g. humans, buildings, parks, plants, trees, sun, animals, grass, mountains, etc). The drawings cannot be indoor scenes. This is to say that our nature scene cannot be a bunch of shapes drawn together with no theme like the drawing created by the program Turtle_Lab_5.py seen in our Week 8 Lab. Our nature scene (program) is to also satisfy the following requirements.

1. We must use Python 3 (the Python IDLE version used in our CSIL lab) to write our program

2. Our program is to execute as soon as one has pressed the F5 key or has selected the option Run -> Run Module from the Python IDLE menu. No user input is required in this assignment. This is to say that the user must not be prompted for any input data once our nature scene Python program has started executing. It executes all on its own.

3. We cannot make use of Python modules that must first be downloaded on a computer before they can be used. We can only use Python modules that are already available on the computer (available by simply using the Python statement import in our Python program).

4. Our drawing must be composed of at least 30 shapes (Each shape must be labelled in the code using comments: e.g. # Shape 31.rectangles.

5.Our drawing must include at least 10 colours. ,

Some of the shapes our program draws must be filled in.

6.Our program must include at least 6 for loops.

7.Our program must include at least 8 functions:

4 of them must be void functions: functions that do not return any “value” (possibly doing drawings and/or pen movements, or creating more complex shapes), · Note that these 4 functions may or may not require parameters. · 6 of them must require parameters (the number of parameters is up to us). · Note that these 6 functions may or may not be void.

8. We have applied the generalization guideline when we created all our functions. This is to say that our functions are as general as they can be. They are designed in such a way (with parameters and/or returned value) that they can solve several similar problems.

9.None of our code is repeated. This is to say that we encapsulated repeated code into functions and have called these functions whenever needed.

10.All our functions terminate with a return statement.

Explanation / Answer

import turtle

# this is the code for drawing star using turtle

a = turtle.Turtle()

  

for i in range(50):

    a.forward(50)

    a.right(144)

# this is the code for drawing and filling shapes like square and #circle