[Tutor] (no subject)

Bob Gailer bgailer at gmail.com
Sat Oct 27 12:27:21 EDT 2018


On Oct 27, 2018 7:48 AM, "Jesse Stockman" <angel.purr.bott at gmail.com> wrote:
>
> Hi there
>
> I need to draw a patten with turtle in python 3.7 but I cant get it to
work here are the specs of the pattern and my code so far can you please
help

Thank you for asking for help. It would help us if you were more specific.
"Can't get it to work" doesn't tell us much.

Does the program run or do you get an error?

If you get an error, also known as a traceback, copy the entire traceback
and paste it into your reply.

Otherwise show us your input and output. Tell us where it differs from what
you expected. Again use copy and paste to show your results.
>
> • Specifications of the pattern o The radius of the three heads is 10.
> o The length of legs is 30. o The length of the sizes of the two
triangles (the body of runner-up and third-place) is 40. They are all
equal-size triangles. The winner’s body is a 40x40 square. o The width of
the three blocks of the podium is 60. The heights are 90, 60, and 40
respectively.
>
> And my code so far
>
> from turtle import *
>
> x = 0
> y = 0
> radius = 0
> x1 = 0
> x2 = 0
> y1 = 0
> y2 = 0
> color = 0
> width = 0
> hight =0
>
>
>
> def main():
>     speed(0)
>     pensize(3)
>     pencolor("black")
>
>     winner_color = "red"
>     second_color = "orange"
>     third_color = "purple"
>     draw_podium(winner_color, second_color, third_color)
>     darw_third(third_color)
>     draw_winner(winner_color)
>     draw_second(second_color)
>
> def move_to(x, y):
>     x = int(input("input X coordinate: "))
>     y = int(input("input y coordinate: "))
>     penup()
>     goto(x, y)
>     pendown()
>
> def draw_head(x, y, radius):
>     radius = int(input("input radius: "))
>     move_to(x, y)
>     circle(radius)
>
> def draw_line(x1, y1, x2, y2):
>     x1 = int(input("line start X: "))
>     y1 = int(input("line start Y: "))
>     x2 = int(input("line end X: "))
>     y2 = int(input("line end Y: "))
>     penup()
>     goto(x1,y1)
>     pendown()
>     goto(x2,y2)
>
> def draw_block(x, y, hight, width, color):
>     move_to(x, y)
>     hight = int(input("input hight: "))
>     width = int(input("input width: "))
>     color(winner_color)
>     begin_fill()
>     forward(width)
>     left(90)
>     forward(hight)
>     left(90)
>     forward(width)
>     left(90)
>     forward(hight)
>     end_fill()
>
>
> main()
> draw_block(x, y, hight, width, color)
>
>
> exitonclick()
>
>
> please help me
> thank you
> kind regards
> Tarantulam
>
>
> Sent from Mail for Windows 10
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list