1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paladinen [302]
3 years ago
6

Create a program that draws a rectangle whenever you click the mouse. The rectangle should have a width of 30 and a height of 50

and be centered at the place where the user clicks. Remember, the position of a rectangle is the top left corner. To place the rectangle at the center of the click, you will need to adjust the position.
Computers and Technology
1 answer:
Alinara [238K]3 years ago
6 0

Answer:

RECT_HEIGHT = 50

RECT_WIDTH = 30

rect = Rectangle(50,30)

       

# random.choice returns a random value from the COLORS

# function will draw a rectangle at x, y

def draw_rect(x, y):

   rectangle = Rect(50, 30)

   rect.set_position(x, y)

   rect.set_color(Color.green)

   add(rect)

# Link to the mouse click event

   add_mouse_click_handler(draw_rect)

Explanation: Hope this works for you.

You might be interested in
A technician is configuring the Windows computers on a network to print to a printer that is directly connected to the network v
finlep [7]

Answer:

Network Printer

Explanation:

A network printer is a type of printer that is accessible by network connections, making it available for use by other computers connected to that network. The network can either come from the printer or from a local computer provided to create network for the printer. Most of them contains a network interface card that allow them connect directly to a local network from which computers can then access them. This is different from a local printer that is directly connect to the computer via USB cable.

Network printer is very advantageous in that multiple network computers can access the printer at thesame time.

7 0
3 years ago
The term used to describe the shape and layout of a computer component such as a motherboard or hard drive is __ factor?
Flauer [41]
FORM factor. Example are ATX, micro ATX, and many more. ATX and MATX are the most common next to servers as well
3 0
3 years ago
In the Word 2016 window, where is the Status bar located?
Ludmilka [50]

Answer:

The Word status bar is displayed at the bottom of your document window. Just click it. You can customize if needed, just right click on the status bar.

Explanation:

6 0
3 years ago
Can I have some help?
Ad libitum [116K]
I believe its A as the image provided says plain message
6 0
2 years ago
What to do when you accidentally delete usb drivers?
amid [387]
Step 1

Save your work and close all programs. You will be restarting your computer during the process.

Step 2

Click “Start” from the task bar and then choose “All Programs.”

Step 3

Click “Accessories” from the program menu. Choose “System Tools” from the side pop-out menu and then select “System Restore.”

Step 4

Click “Restore my computer to an earlier time” from the Welcome screen. Click “Next” at the bottom.

Step 5

Choose a date in bold from the calendar shown on the Restore Point page. The date that you choose should be an earlier one, like a day or two before the deletion occurred. Click “Next” at the bottom of the window.

Step 6

Click “Next” on the next page. The restoration begins, and your computer will restart.

Step 7

Click “OK” from the completion window that appears when your computer loads again.

3 0
3 years ago
Other questions:
  • Yahoo! allows users to create personalized my yahoo! pages. users can add or delete a variety of information from their personal
    8·2 answers
  • Question 5
    5·1 answer
  • 1. Describe a linear search (explain how it works).
    13·1 answer
  • A person who wants to buy a compact disc (cd) has just enough money to buy one, and chooses cd a instead of cd
    10·2 answers
  • The space force enhancement function concerned with providing data on meteorological, oceanographic, and space environmental fac
    12·1 answer
  • What conclusion did Freud reach when attempting to understand the connection between psychological and physical problems?
    12·1 answer
  • The Telecommunications Act of 1996 was a mixed bag for cable customers. Although cable companies argued that it would bring more
    8·1 answer
  • ____ is the dubious practice of registering a domain name and then trying to sell the name for big bucks to the person, company,
    5·2 answers
  • Which of the following is not a data visualization technique?
    6·1 answer
  • An ALGORITHM IS?<br> PLEASE HELP
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!