filmov
tv
Python - Turtle Race Game V2.0 (Part 1/2)

Показать описание
Learn how to a turtle race game using Python's Turtle module. This is an updated version on my original turtle race game.
~ CODE FOR PART 1 ~
from turtle import *
from random import *
import turtle
import time
# SCREEN SETUP
setup(800, 500)
title("Turtle Race")
bgcolor("forestgreen")
speed(0)
# HEADING
penup()
goto(-100, 205)
color("white")
write("TURTLE RACE", font=("Arial", 20, "bold"))
# DIRT
goto(-350, 200)
pendown()
color("chocolate")
begin_fill()
for i in range(2):
forward(700)
right(90)
forward(400)
right(90)
end_fill()
# FINISH LINE
gap_size = 20
shape("square")
penup()
# WHITE SQUARES ROW 1
color("white")
for i in range(10):
goto(250, (170 - (i * gap_size * 2)))
stamp()
# WHITE SQUARES ROW 2
for i in range(10):
goto(250 + gap_size, ((210 - gap_size) - (i * gap_size * 2)))
stamp()
# BLACK SQUARES ROW 1
color("black")
for i in range(10):
goto(250, (190 - (i * gap_size * 2)))
stamp()
# BLACK SQUARES ROW 2
for i in range(10):
goto(251 + gap_size, ((190 - gap_size) - (i * gap_size * 2)))
stamp()
~ CODE FOR PART 1 ~
from turtle import *
from random import *
import turtle
import time
# SCREEN SETUP
setup(800, 500)
title("Turtle Race")
bgcolor("forestgreen")
speed(0)
# HEADING
penup()
goto(-100, 205)
color("white")
write("TURTLE RACE", font=("Arial", 20, "bold"))
# DIRT
goto(-350, 200)
pendown()
color("chocolate")
begin_fill()
for i in range(2):
forward(700)
right(90)
forward(400)
right(90)
end_fill()
# FINISH LINE
gap_size = 20
shape("square")
penup()
# WHITE SQUARES ROW 1
color("white")
for i in range(10):
goto(250, (170 - (i * gap_size * 2)))
stamp()
# WHITE SQUARES ROW 2
for i in range(10):
goto(250 + gap_size, ((210 - gap_size) - (i * gap_size * 2)))
stamp()
# BLACK SQUARES ROW 1
color("black")
for i in range(10):
goto(250, (190 - (i * gap_size * 2)))
stamp()
# BLACK SQUARES ROW 2
for i in range(10):
goto(251 + gap_size, ((190 - gap_size) - (i * gap_size * 2)))
stamp()
Turtle Race Game in Python | Python Turtle Graphics Tutorial # 30 | python turtle race game
Python Tutorial | Python Turtle Race Game | Python for beginners
How do you make a turtle race game in Python?|#pythonturtle
Python Beginner Project Tutorial - Turtle Racing!
Python Tutorial - Turtle Race Game (2/2)
Python Tutorial - Turtle Race Game (1/2)
Python - Turtle Race Game V2.0 (Part 1/2)
Python Tutorial | Python Turtle Race Game (Advanced)
Python Turtle Tutorial - Code Your First Game!
Turtle 🐢🐢 Racing game using python🐍
Python Turtle Race Game
Python Turtle Graphics Tutorial - Turtle Race Game with Final Rankings, 1/2
Python Games | Turtle Race Game | Coding For Kids in Python | Part 1
Making Turtle Race Game Using Python | Python Ticks | Turtle Tricks
How to Create a Turtle race game using python code?😲🤔
Turtle Racing Game in Python
Python Turtle race
Python Turtle - 11 - Turtle Race Game
I have made a turtle race game in python with the help of turtle loop.
Python Turtle Race Game | Python Tutorial | Python for beginners
Python Project for beginners #11| Turtle Race Project | Python for Beginners #lec119
Turtle Race Game using Python | Python Turtle #shorts #python #coding #programming
Turtle Race Game Promo
Turtle racing game using python#programming #python #shorts #coding #coding
Комментарии