Question: 06 Prove Assignment: Writing Functions Overview Prove that you can write and call functions by writing a program that draws an outdoor scene in a

06 Prove Assignment: Writing Functions Overview Prove that you can write and06 Prove Assignment: Writing Functions

Overview

Prove that you can write and call functions by writing a program that draws an outdoor scene in a window.

Problem Statement

Most modern computer operating systems have graphical user interfaces (GUIs) that are rich with colors, icons, images, menus, tabs, buttons, text fields, sliders, scroll bars, etc. However, many Python programs are designed to run in a console window, also called a terminal window, to read user input from a keyboard, and to print text as output to the console window. This means that many Python programs are not designed and written to take advantage of the rich features of graphical user interfaces.

Python includes two competing libraries of code named tkinter and kivy that enable a program to have a user interface.

Assignment

During this lesson, you will write code that draws the remaining elements in your scene. The scene that your program draws must be outdoor, the sky must have clouds, and the scene must include repetitive elements such as blades of grass, trees, leaves on a tree, birds, flowers, insects, fish, pickets in a fence, dashed lines on a road, buildings, bales of hay, snowmen, snowflakes, or icicles. Be creative.

Each repetitive element must be drawn by a function that your program calls repeatedly, once for each repeated element. For example, your program may include a function named draw_leaf that your program repeatedly calls to draw all the leaves on a tree.

As you write your program, be sure that it draws elements in the order of farthest to nearest. For example, your program should draw the sky first, then clouds, then the ground, then trees, and then insects in the trees.

Testing Procedure

Verify that your program works correctly by following each step in this testing procedure:

  1. Run your program and verify that it correctly opens a window and draws within that window a complete outdoor scene that contains the sky, clouds, the ground, and other elements.

Scene - Scene -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!