Question

I need help with turtle graphics assignment in python 3, please!

Write a program named Lastname_firstname_clock.py to display a clock face with hands showing the current time. The radius of

0 0
Add a comment Improve this question Transcribed image text
Answer #1
import datetime

import turtle

myPen = turtle.Turtle()
myPen.shape("arrow")

myPen.speed(0)

#currentMinute = datetime.datetime.now().minute
#currentHour = datetime.datetime.now().hour
currentMinute=datetime.datetime.now().minute
currentHour=datetime.datetime.now().hour

myPen.penup()
myPen.goto(0,-180)
myPen.pendown()
myPen.color("blue")
myPen.circle(180)

myPen.color("red")

myPen.penup()
myPen.goto(0,0)
myPen.setheading(90) # Point to the top - 12 o'clock
myPen.right(currentHour*360/12)
myPen.pendown()
myPen.forward(100)

myPen.penup()
myPen.goto(0,0)
myPen.setheading(90) # Point to the top - 0 minute
myPen.right(currentMinute*360/60)
myPen.pendown()
myPen.forward(150)


myPen.getscreen()


screen=turtle.Screen()
screen.exitonclick()

Add a comment
Know the answer?
Add Answer to:
I need help with turtle graphics assignment in python 3, please! Write a program named Lastname_firstname_clock.py to display a clock face with hands showing the current time. The radius of the clock...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT