Question
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?
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started