Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Videos

Question
Book Icon
Chapter 4, Problem 3PE
Program Plan Intro

Program to draw a face

Program plan:

  • Import the required graphics package.
  • Define the main method.
    • Using the object GraphWin(), to display the graphics window.
    • Using the method setCoords(), set the size of the graphics window.
    • Using the method Oval(),draw an oval to represent head.
    • Using the method Circle(),draw a circle to represent eyes.
    • Using the method Rectangle(), draw the rectangle to represent mouth.
    • Using for loop, draw teeth by cloning the Rectangle object.
    • Using the method Line(), draw the line in Rectangle object to represent lips.
  • Call the function “main()”.

Blurred answer
Students have asked these similar questions
Write a program that simulates picking a card from a deck of 52 cards. Your program should display the rank (Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King) and suit (Clubs, Diamonds, Hearts, Spades) of the card.
Write a program that draws 5 dice on the screen depicting a straight (1, 2,3, 4, 5 or 2, 3, 4, 5, 6).
Write a program to design a graphical user Interface for Your coffee shop or restaurant or any business from your own choice. Your program should allow the customer to make an order using a button called Make an order. The customer can select the order from a drop down list (at least must have 4 products in the menu). For example, Green Tea, Late, Cappuccino, Tea. The customer can customise their order such as (no sugar, with sugar, with cream, with milk, ...etc). The customer can select the size of the order such as (regular, large). The customer can see the details of his order with the price before clicking the button Make Payment. The customer should insert the total amount of the order in the input box then click on Make Payment. The program should check if the amount of the total price is equal to the input number the customer entered, then the program can show a message "payment successfully done and your order is under process", otherwise the program should ask the user to…
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Systems Architecture
    Computer Science
    ISBN:9781305080195
    Author:Stephen D. Burd
    Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY