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 2PE
Program Plan Intro

Program to draw concentric rings

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 Circle(), draw the circle.
    • Using the method setOutline(), set the outline of the object to the given color.
    • Using the method setFill(), set the interior of the object to the given color.
    • Using the method setWidth(), set the width of the outline of the object to the desired number of pixels.
    • Using the method draw(), draw the square inside the graphics window.
    • Use the same methodology for drawing other colors in the graphics window.
  • Call the function “main()”.

Blurred answer
Students have asked these similar questions
What is cloud computing and why do we use it? Give one of your friends with your answer.
What are triggers and how do you invoke them on demand? Give one reference with your answer.
Discuss with appropriate examples the types of relationships in a database. Give one reference with your answer.
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
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781305480537
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY