Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi I really need help in this code please help. This code needs to be in Python language please only write it in python Please

Hi I really need help in this code please help. This code needs to be in Python language please only write it in python

Please answer this correctly and make sure it works. And please only answer it if yo know the answer:

Write a program to draw ghosts on the screen. You must do this by writing a function called draw_ghost, which takes three parameters, the x location of the ghost, the y location of the ghost and the color of the ghost. x and y for the ghost define where the center of the head should go.

Note: Be sure to include comments for all functions that you use or create.

def draw_ghost(center_x, center_y, color): 

Final Product

Here is a screenshot of a sample run of the ghosts program with these function calls.

center_x = get_width()/2 center_y = get_height()/2 draw_ghost(center_x, center_y, Color.red) draw_ghost(100, 100, Color.green) draw_ghost(370, 150, Color.black) draw_ghost(40, 200, Color.orange) draw_ghost(300, 50, Color.yellow)

Why not try adding more calls and more ghosts?

image text in transcribed

Hints

  • The constants for all of the ghost dimensions are given.
  • Start off with something simpler. Try just drawing the general ghost shape, which is a circle and then a rectangle on top. The top edge of the rectangle should be in the middle of the circle.

Please write it in python and i don't these are trutles this is a codehs problems and the final product should look like the pic pne

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

b. Does senior management trust the team?

Answered: 1 week ago

Question

How will the members be held accountable?

Answered: 1 week ago