Skip to content
← Back to Community
Coding a Simple Python Turtle Game (part one: Importing Modules)
Profile icon
gatorade322

introduction

Hello, everybody. Today, I am going to show you how to make a simple python turtle game (part one). This game is called cat and the laser, which I thought was a suitable name for it. So let's get started. Note, this does not work with repl.it, because with repl.it's turtle function, you cannot set the size of the window. So I will leave it up to you to find out what you want to use for this. Thanks!

importing modules

OK. So, here is the code we will use in this lesson:

import turtle import time import random import math

turtle, I think you know, is the thing that lets you do graphics (that's why it's called turtle graphics).
time let's you wait for an amount of seconds.
random let's you chose a random word or number.
math, we will use to know if the turtle hits the goal. Once you've added these in, you can move on to the next one - I'll make sure to leave a link to that in the comments once I finish it. If I don't, please remind me.

Voters
Profile icon
Mohamed-Faisal1
Profile icon
EnsildBici
Profile icon
ilyalk
Profile icon
ZacSchoolAccount
Profile icon
gatorade322
Comments
hotnewtop
Profile icon
LandenBarlag
Profile icon
UnityBird20
Profile icon
gatorade322
Profile icon
UnityBird20

@gatorade322 purple sus

Profile icon
gatorade322
Profile icon
Cag82407

Nah bro, ur sus. Bro you ran away from body, I saw we vote @UnityBird20

Profile icon
[deleted]

how to move?