Python Turtle Graphic Questions

Asked 2 years ago, Updated 2 years ago, 19 views

import turtle as t import random

def RaceSize(): t.penup() big = t.textinput (""Please size the stadium. (100–500)") big=int(big) while(True):
if big500 : big=t.textinput(""),too large. "Please decide again" big=int(big) else : big=int(big) t.goto(-1*big//2,-1*big//2) t.color("yellow") t.pendown()

def RaceDraw(): for i in range(4): t.forward(big) t.left(90)

t.shape("turtle") RaceSize(); RaceDraw();

This is the sauce. I don't know why it doesn't work.

python

2022-09-22 18:34

1 Answers

If it doesn't work

And, on the code

def RaceDraw():
    for i in range(4):
       t.forward(big)
       t.left(90)

What's in the big value here? I think there is an error because there is no value of big just by looking at the code.


2022-09-22 18:34

If you have any answers or tips

Popular Tags
python x 4647
android x 1593
java x 1494
javascript x 1427
c x 927
c++ x 878
ruby-on-rails x 696
php x 692
python3 x 685
html x 656

© 2024 OneMinuteCode. All rights reserved.