Write a program using the graphics module which draws in the center of a window of size 250 x 250 pixels with the title "Simple interaction", a centered red filled square of side 2*x pixels where x comes as input from an entry field placed somewhere in the window. After the square is drawn if the user clicks somewhere on the window the program should terminate. The order of user actions are the following: enter integer value in entry field, click somewhere on the widow, draw red filled square, click somewhere again, close the window.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 3GZ
Question
Python F7
Write a program using the graphics module which draws in the center of a window of size 250 x
250 pixels with the title "Simple interaction", a centered red filled square of side 2*x pixels
where x comes as input from an entry field placed somewhere in the window. After the square is
drawn if the user clicks somewhere on the window the program should terminate. The order of
user actions are the following: enter integer value in entry field, click somewhere on the widow,
draw red filled square, click somewhere again, close the window.
The result should look similar to the figure below.
You can assume that the input will be valid.
order of use
where on the wir
The result should look simila
You can assume that the input
ow
Simple Ieteraction
Transcribed Image Text:Write a program using the graphics module which draws in the center of a window of size 250 x 250 pixels with the title "Simple interaction", a centered red filled square of side 2*x pixels where x comes as input from an entry field placed somewhere in the window. After the square is drawn if the user clicks somewhere on the window the program should terminate. The order of user actions are the following: enter integer value in entry field, click somewhere on the widow, draw red filled square, click somewhere again, close the window. The result should look similar to the figure below. You can assume that the input will be valid. order of use where on the wir The result should look simila You can assume that the input ow Simple Ieteraction
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,