Комментарии:
Full code:
from turtle import *
from random import randrange
from freegames import square, vector
food = vector(0, 0)
snake = [vector(10, 0)]
aim = vector(0, -10)
def change(x, y):
"Change snake direction."
aim.x = x
aim.y = y
def inside(head):
"Return True if head inside boundaries."
return -200 < head.x < 190 and -200 < head.y < 190
def move():
"Move snake forward one segment."
head = snake[-1].copy()
head.move(aim)
if not inside(head) or head in snake:
square(head.x, head.y, 9, 'red')
update()
return
snake.append(head)
if head == food:
print('Snake:', len(snake))
food.x = randrange(-15, 15) * 10
food.y = randrange(-15, 15) * 10
else:
snake.pop(0)
clear()
for body in snake:
square(body.x, body.y, 9, 'green')
square(food.x, food.y, 9, 'red')
update()
ontimer(move, 100)
hideturtle()
tracer(False)
listen()
onkey(lambda: change(10, 0), 'Right')
onkey(lambda: change(-10, 0), 'Left')
onkey(lambda: change(0, 10), 'Up')
onkey(lambda: change(0, -10), 'Down')
move()
done()
Module name head not found
Plsss fix it
No module named 'freegames'
Ответитьfack you
from turtle import*
from random import randrange
from freegames import square,vector
bro please reply
when i tap on run module it shows error about that freegames in the 3rd line
I finished, no error, but its not opening
Ответитьthank you sir!
ОтветитьFrom freegames import square, vector
Modulenotfiunderror: no module named 'freegames'
WHY THiS IS COMING TO ME
PLEASE TELL ME THE SOLUTION GUYSS????
Bro at my end it was showing that no module like freegames was found 😢
ОтветитьSir,how to package it?
ОтветитьI created the code inside pycharm but it didn't open the graphic screen with snake. what is missing?
Ответитьhi ak i know you very well
ОтветитьI got this Error :- ModuleNotFoundError: No module named 'freegames'
Ответитьbhai error bol raha hai no modules with freegames likh raha hai kya karko
ОтветитьApp name? Please 🙏
ОтветитьNo module named 'freegames' (i use pycharm)
ОтветитьThanks bro love u❤❤❤
ОтветитьThanks bro love u❤❤❤
ОтветитьIs not working at all
Ответитьits good
ОтветитьThey are puting no module named 'freegames'
ОтветитьHow to download the page
Ответитьbhai page ka download
Ответитьgood
ОтветитьWhat if u don’t have free games how do u run the project?
ОтветитьOp bro 👍
Ответитьfuckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
ОтветитьMy device is showing a "module not found error" ... Apparently it says that there is no module named freegames
ОтветитьThere are no errors but program isn't running ?
Ответитьcan we put this in our resume?
Ответитьdosnt work i dont give for you free robux
ОтветитьSir what is the engine
ОтветитьThat showing No module named 'freegames'
ОтветитьThat showing in red colour error
Why
I am not getting the output please help me
ОтветитьWhat applications have you used?
ОтветитьDo we need anything else after script this code in python to run this program??
ОтветитьTo me its not working ... its showing NO module named 'freegames' how can i make it
ОтветитьI need assets??? Can u provide???
Ответитьbhai mjhe module ka msla arha he koi help krdo jesei code type krta hn
from turtle import *
from random import randrange
from freegames import square, vector
to module error deta hai
ye error deta h
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'freegames'
plZ koi solution btado
this suck 😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡
ОтветитьWhich software are u using for python
ОтветитьProgram is not run
ОтветитьIF YOU LIKE THIS VIDEO THEN LIKE THIS COMMENT
ОтветитьAlso I copied your codes and it didn't work
ОтветитьI can't move the snake in the game
Ответитьbut there is a bug in this code when we move forward and collecting food and if i move backward then snake has dead.... conclusion is we can not use up key with down key after eating 2,3 food
ОтветитьSir no module name 'freegames' ??
Ответитьnot work
Ответить