-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.py
More file actions
43 lines (30 loc) · 742 Bytes
/
project.py
File metadata and controls
43 lines (30 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import turtle
import time
width = 500
height = 400
def get_numbers_of_racers():
racers =0
while True:
racers = input("enter the numbr of racers(2 -10): ")
if racers.isdigit():
racers =int(racers)
else:
print("enter valid numberic ... try again")
continue
if 2 <racers <=10:
return racers
else:
print("number are not in range of 2 -10 try again ")
def init_turtle():
screen = turtle.Screen()
screen.setup(width,height)
screen.title("siddhu")
racers = get_numbers_of_racers()
ans =init_turtle()
print(ans)
racer =turtle.Turtle()
racer.forward(100)
racer.left(50)
racer.backward(100)
time.sleep(5)
print(racers)