0

Why there are some error

I am using python 3 with pygame Code: https://code.sololearn.com/csSDTmoNPw5E/?ref=app Error code: Unused import color from wildcard import Unused import rect from wildcard import Undefined variable “FULLSCREEN” Undefined variable “KEYDOWN” Undefined variable “K_ESCAPE” Undefined variable “QUIT” Thank you for your help !

27th Mar 2020, 2:36 PM
Ethan
Ethan - avatar
4 Answers
+ 3
Where did you run this code? I suppose that it was not in playground, as pygame is not supported here. So if you are working on an IDE on your local device, it is hard to guess where these problems are coming from. But independent from this, there are some typos in your code: running = Ture # should be True if event = K_ESCAPE: #<<<< should be == running = False elif event.type == QUIT: running = false # You should use the same spelling like 2 lines above
27th Mar 2020, 2:58 PM
Lothar
Lothar - avatar
+ 2
Pygame isnt a module
28th Mar 2020, 7:22 AM
Wade
Wade - avatar
28th Mar 2020, 1:51 PM
NightSkyLeaf
NightSkyLeaf - avatar
0
i use VS , and i have use==in my computer
27th Mar 2020, 4:15 PM
Ethan
Ethan - avatar