Python doesn't recognize neither Pygame nor Arcade

120 views Asked by At

I am very new to coding overall, so its more than likely my fault this is happening.

I tried to create a pong game using Turtle. The window would open and the background was black, the way I had meant it to be, but my curser would load and my tab would indicate 'not responding'. I then tried to switch to Pygame, I went to my command prompt and run pip install pygame. I am on Windows so this was what I was was instructed to run; I watched the download bar fill up and complete, but when i go to import pygame it got the error message no module named pygame. I tried to download pygame again and got the message requirement already satisfied. I tried to switch to Arcade yet the same thing happened. Any suggestions?

Here is my code:

import turtle
window = turtle.Screen()
window.title("i made a pong game")
window.bgcolor("black")
window.setup(width=800, height=600)
window.tracer(0)

def paddle_function():
    paddle_a = turtle.Turtle()
    paddle_a.speed(0)
    paddle_a.shape("square")
    paddle_a.color("black")
    paddle_a.shapesize(stretch_wid=5, stretch_len=1)
    paddle_a.penup()
    paddle_a.goto(-350, 0)
    turtle.mainloop()
    turtle.done()
0

There are 0 answers