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 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:
-
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
Get step-by-step solutions from verified subject matter experts
