Check out the full playlist here: kzbin.info/www/bejne/eIGafICil9unhdE Become a member and support the channel: kzbin.info/door/2vm-0XX5RkWCXWwtBZGOXgjoin
@balaji.n78194 жыл бұрын
can you say what to doin terminal should we install turtle?
@TokyoEdTech4 жыл бұрын
The turtle module comes with Python so you don't need to install it
@sahirbinsaud6803 жыл бұрын
File "c:\Users\*****\Desktop\PyGame\main.py", line 8, in wn = turtle.screen AttributeError: module 'turtle' has no attribute 'screen' plz plz plz help anyone
@sahirbinsaud6803 жыл бұрын
@@TokyoEdTech File "c:\Users\*****\Desktop\PyGame\main.py", line 8, in wn = turtle.screen AttributeError: module 'turtle' has no attribute 'screen' plz plz plz help anyone
@TokyoEdTech3 жыл бұрын
@@sahirbinsaud680 Screen should be capitalized. Screen not screen.
@neonboy19983 жыл бұрын
found you from free code channel. the guy who was teaching snake there was completely useless in teaching and i got the concepts of the pong so easily due to your teaching methods. thanks again for uploading these kind of videos of aspiring software engineers like us. really appreciate your time and effort in doing so.
@TokyoEdTech3 жыл бұрын
Thanks for the kind words - much appreciated. Keep on codin'!
@اقراء-و5ه5 жыл бұрын
the best educator on the internet tysm...your videos are really helpful
@milkshakeinasnowstorm5 жыл бұрын
I came here to seek out the snake tutorial because I've seen your Pong tutorial on an other video (compilation of Python game tutorials). Just want to say thank you, and to tell you that the way you're explaining and presenting everything line by line is very, very helpful for us beginners.
@sephplayzshortz89432 жыл бұрын
The way you explain things are SPOT ON. Most programming tutorials for snake game always say you need to put on curses you need to import the pygame modual. You have done none of that and has made sure this tutorial is compatible for Mac and Windows and Linux. I love how you mentioned that you need to test after every paragraph of code you do, I used to be one of those people who did the whole thing but you t a ugh me that you aren't going to go far without testing a new peice of code! Yesterday, I did the Pong game you did and it was the best tutorial I have ever seen. You have earnt a sub!
@TokyoEdTech2 жыл бұрын
Thank you, I try! I teach middle and high school coding, so that is my intended audience - it needs to be spelled out clearly. Plus, it is easier if you don't have to install something like curses or pygame. The turlte module is pretty powerful once you learn it. Check out my Space Arena tutorial to see what is possible.
@sephplayzshortz89432 жыл бұрын
@@TokyoEdTech thank you for the advice! I'll be a pro at python in no time!
@marc1352 жыл бұрын
I am currently at summer camp working on a coding project and I have absolutely no experience with python AT ALL. Your videos are very easy to understand and very very helpful. It took me 4 hours to find the right snake game tutorial - good thing I found this video.
@TokyoEdTech2 жыл бұрын
Great to hear! Glad I could help. Keep on codin'!
@chloekimball5365 жыл бұрын
I have finished the series and I am commenting here so people who are in a dilemma to continue can read my comment. THIS SERIES IS ABSOLUTELY FANTASTIC! Clear, concise and absolutely no bullshit
@rushaan30394 жыл бұрын
I love this, thank you so much for helping me out i will be watching all the parts of creating snake game and subbed also keep making videos like this! A big thumbs up
@sc0utop7414 жыл бұрын
I just love ur effort and would like to say Thanks a ton my hero!!!😃😃😃😃
@TokyoEdTech4 жыл бұрын
Thanks! Keep on codin'!
@Yzrie5 жыл бұрын
How do you get that kind of python? I can't press backspace in my version. (Sorry if it looks like a dumb question. Beginner here)
@konoyaro0921 күн бұрын
1:33 how did you get that list,in my python there is no list by default please help
@TokyoEdTech21 күн бұрын
@@konoyaro09 It depends on which editor or IDE you are using. Check out Geany or VS Code.
@heartoffire59022 жыл бұрын
I can't tell you how deeply I appreciate you both using and encouraging others to use iterative programming to ensure you can quickly locate and fix issues. I naturally use this technique, partly because I'm new to programming and I know how easily things can break, and partly because I simply enjoy seeing my creation develop and grow in a tangible way. It also helps extraordinarily when watching tutorials like this. I was watching someone else's earlier and frankly it was extremely stressful because he was making mistakes and didn't check his code until at least 10 minutes into the video, at which point he ran into the consequence that I had spotted from the start. But I assumed he knew what he was doing because he was more experienced, so I spent a lot of time simply typing without explanation as to what I was doing - and I didn't get to figure out where any other problems were because there were no points for comparison along the way for testing. I felt like there wasn't much point in continuing because I just ended up feeling frustrated with myself, the code, and the guy who was actually kind enough to make a tutorial in the first place. I did decide to check out your channel after that. Your Pong series was the first one I used and it made programming feel not only possible, but also sensical. Your teaching technique is clear, efficient, and encouraging. I'm actually learning things along the way and understanding the purpose and use of each piece of code instead of just copying and attempting to google everything frantically hoping I'll flail across the internet enough until I hit the right answer. So thank you for sharing all these techniques and putting so much of yourself into allowing things to make sense to people who are new to this world.
@TokyoEdTech2 жыл бұрын
You are quite welcome - glad you found value here! I do try to keep things step by step - I teach middle and high school students and small digestible chunks are very helpful. It drives me nuts when my students don't test their code as they go along - so I have to model the correct behavior. Learning to code is a long process - there's always something new to learn! But, once you get the basics down, it becomes much easier. Keep on codin'!
@Hunkzes5 ай бұрын
I have no idea how to thank you, I really appreciate the effort. It is my first python project and you helped me a lot.
@TokyoEdTech5 ай бұрын
Thank you is enough...keep on codin'!
@littlenickey35544 жыл бұрын
Thank you so much for the tutorial! Just finished the basics, but I was wanting to know how you would go about coding a computer to play snake against you. Thank you!
@TokyoEdTech4 жыл бұрын
Thanks! The first thing I'd do is to get a second player on the screen that works with with the keyboard. Once you do that, then you can start thinking about automating the snake.
@noskillant61686 жыл бұрын
Love your videos man. Please keep it up! Definitely helps someone like me who is self teaching off mainly youtube.
@olakolade66564 жыл бұрын
You are an amazing youtuber! I'm a teenager learning to code and you have really helped me! Thanks!
@Tanzanight-yo9lw4 жыл бұрын
This is soo much better than other tutorials!!
@konoyaro0921 күн бұрын
1:32 in my python i dont get that list,how can i fix that
@liamg.-devkat94516 жыл бұрын
The version you made is very simple and great for beginners! I really like this because there is so much you could add on to it like a Game Over screen or buttons with tkinter
@aidenpd10064 жыл бұрын
Hey, I really like your videos and I think it's great how fast you respond to these comments! Just a quick question - nothing's wrong with my code, but I get this message every time I run the program: "DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning." Is there a way to fix this or at least stop this from showing every time? (where do I "set TK_SILENCE_DEPRECATION=1"?). Also, if it helps I'm on a mac, and if you don't know that's okay. Thanks for the super helpful videos!
@tentekgaming36875 жыл бұрын
This is my first Python practice with your video and it worked at first try :D. Subed and liked.
@I_Am_Kot4 жыл бұрын
I followed these tutorials and made my first game in python. Thanks for making this tutorial! P.S I checked out the github and I really like the multiplayer version!
@TokyoEdTech4 жыл бұрын
Great to hear - keep on codin'!
@bountyhunter81325 жыл бұрын
Plus, I loved that space invaders series of yours. Amazing
@Grunge_Lemon2 жыл бұрын
cannot believe you still help people to this day. absolute legend!!
@TokyoEdTech2 жыл бұрын
Thanks - I try!
@alishavandi36133 жыл бұрын
Thank you for these awesome tutorials. Is there a way to display a grid where the snake is moving?
@TokyoEdTech3 жыл бұрын
Yep - you just need to use a background image or draw the lines indivudually.
@DOARE4 жыл бұрын
here is the code import turtle import time import random delay = 0.1 # Score score = 0 high_score = 0 # Set up the screen wn = turtle.Screen() wn.title("Snake Game by @TokyoEdTech") wn.bgcolor("green") wn.setup(width=600, height=600) wn.tracer(0) # Turns off the screen updates # Snake head head = turtle.Turtle() head.speed(0) head.shape("square") head.color("black") head.penup() head.goto(0,0) head.direction = "stop" # Snake food food = turtle.Turtle() food.speed(0) food.shape("circle") food.color("red") food.penup() food.goto(0,100) segments = [] # Pen pen = turtle.Turtle() pen.speed(0) pen.shape("square") pen.color("white") pen.penup() pen.hideturtle() pen.goto(0, 260) pen.write("Score: 0 High Score: 0", align="center", font=("Courier", 24, "normal")) # Functions def go_up(): if head.direction != "down": head.direction = "up" def go_down(): if head.direction != "up": head.direction = "down" def go_left(): if head.direction != "right": head.direction = "left" def go_right(): if head.direction != "left": head.direction = "right" def move(): if head.direction == "up": y = head.ycor() head.sety(y + 20) if head.direction == "down": y = head.ycor() head.sety(y - 20) if head.direction == "left": x = head.xcor() head.setx(x - 20) if head.direction == "right": x = head.xcor() head.setx(x + 20) # Keyboard bindings wn.listen() wn.onkeypress(go_up, "w") wn.onkeypress(go_down, "s") wn.onkeypress(go_left, "a") wn.onkeypress(go_right, "d") # Main game loop while True: wn.update() # Check for a collision with the border if head.xcor()>290 or head.xcor()290 or head.ycor() high_score: high_score = score pen.clear() pen.write("Score: {} High Score: {}".format(score, high_score), align="center", font=("Courier", 24, "normal")) # Move the end segments first in reverse order for index in range(len(segments)-1, 0, -1): x = segments[index-1].xcor() y = segments[index-1].ycor() segments[index].goto(x, y) # Move segment 0 to where the head is if len(segments) > 0: x = head.xcor() y = head.ycor() segments[0].goto(x,y) move() # Check for head collision with the body segments for segment in segments: if segment.distance(head) < 20: time.sleep(1) head.goto(0,0) head.direction = "stop" # Hide the segments for segment in segments: segment.goto(1000, 1000) # Clear the segments list segments.clear() # Reset the score score = 0 # Reset the delay delay = 0.1 # Update the score display pen.clear() pen.write("Score: {} High Score: {}".format(score, high_score), align="center", font=("Courier", 24, "normal")) time.sleep(delay) wn.mainloop()
@TokyoEdTech4 жыл бұрын
Thanks for sharing - there is also a link the description to the code on GITHUB.
@jasejoe81173 жыл бұрын
thanks dude im not familiar with git hub
@TokyoEdTech3 жыл бұрын
@@jasejoe8117 Check it out - it is very helpful!
@megashock13195 жыл бұрын
Whenever I do anything with "import (whatever)" it gets greyed out and the word "import" isn't red anymore. Im prolly just dumb, but I don't know how to not make it go grey after I press anything
@megashock13195 жыл бұрын
@@TokyoEdTech I fixed it, I was using pycharm and it sends an message if something is imported but isn't being used.
@thestartupguy39756 жыл бұрын
Helped sooooo much to keep my game window open!!! Thanks sooo much!!!
@Oderwat Жыл бұрын
I just want to let you know that I just got a snake game with your name as "creator" from an AI that uses the LLM "deepseek-coder". So they have for sure used your code for training and the AI kind of copies what you did.
@TokyoEdTech Жыл бұрын
Thanks for letting me know. It's all good - if my code can help others I'm happy. Keep on codin'!
@BigDaddyGuagg5 жыл бұрын
Isn't there something better than the turtle module?
@SUNYBOI4 жыл бұрын
Sir I ran the code ....my green screen came but it vanished quickly
@TokyoEdTech4 жыл бұрын
Check the link that says "NEED HELP?".
@colwarsstudiobrickfilmandm85804 жыл бұрын
I had that issue you have to open the python idle and make open the file. Than run it through there its not a code error it took me forever to figure that out! I guess on some laptops you cant run a .py file through terminal...
@TokyoEdTech4 жыл бұрын
@@colwarsstudiobrickfilmandm8580 Glad you figured it out on your own. But I wish people would realize I can't help without seeing the code and save me the effort of having to ask every time.
@theSoberSobber5 жыл бұрын
Sir, I am not able to Run the File In Terminal (I am also Using VS Code). The Terminal Pops up for about a second and then just disappears. I am not able to drag the window from above as you do......... Please help...
@DrNupurDubey4 жыл бұрын
hi, I want an image in the background what should I do?
@DrNupurDubey4 жыл бұрын
@@TokyoEdTech thank u so much
@DrNupurDubey4 жыл бұрын
@@TokyoEdTech hello ,instead square shape of head can we use a image
@poketube72224 жыл бұрын
A lots of Thanks from India 🇮🇳
@prod.shanmuga53794 жыл бұрын
U teach really well just started with python and I'm really happy . Print("Thanks Mann")😂
@TokyoEdTech4 жыл бұрын
print("Happy to hear that!")
@sahirbinsaud6803 жыл бұрын
File "c:\Users\*****\Desktop\PyGame\main.py", line 8, in wn = turtle.screen AttributeError: module 'turtle' has no attribute 'screen' plz plz plz help anyone
@dam225223 жыл бұрын
thanks for leading in my first python project
@TokyoEdTech3 жыл бұрын
You're welcome - keep on codin'!
@codingisfun0074 жыл бұрын
Source Code: import turtle # Set up the screen wn = turtle.Screen() wn.title("Snake Game") wn.bgcolor("green") wn.setup(width=600, height=600) wn.tracer(0) wn.mainloop()
@shaka44484 жыл бұрын
Yay I have come from pong and am excited to start on this
@yuvithegreat38784 жыл бұрын
Same
@anugeeta74204 жыл бұрын
I'm not getting the title in output. What should i do?
@TokyoEdTech4 жыл бұрын
Check the link that says "NEED HELP?"
@hanli49775 жыл бұрын
Hi Christian. Thank you for the amazing tutorial. Is there any way to add a "pause" function to the game? When the snake hits the wall, can we make the snake coming out from the other wall, insteaded of game over? Great Job!!
@jordynmuldrow38852 жыл бұрын
Thank you so much for your tutorials, they have been super helpful.
@TokyoEdTech2 жыл бұрын
You're very welcome - glad I could help. Keep on codin'!
@dadipy589 ай бұрын
fr
@迷路人-i8l4 жыл бұрын
hello ,Mr thompson,i want to ask you a question for the visual studio, i have been written a same code with you, but i cannot display a canvas, can you tell me how to correct?
@迷路人-i8l4 жыл бұрын
@@TokyoEdTech thx,I have found the reason why it cannot to run, I actually missed the last line of code. lol
@迷路人-i8l4 жыл бұрын
@@TokyoEdTech Yeah,I have done it XD
@bestcreationinpoetry14224 жыл бұрын
@@TokyoEdTech may i run this in pycharm
@mantease27154 жыл бұрын
Yesss!!!! It worksss!!! hope you upload more videos like this
@TokyoEdTech4 жыл бұрын
I will try my best.
@Rl-tn1ys4 жыл бұрын
yes he does a lot
@itzeclipse74493 жыл бұрын
My code works, but the screen is only staying up for a millisecond. What do I do?
@TokyoEdTech3 жыл бұрын
Check the Link that says Need Help? And get back to me.
@ssayorr3 жыл бұрын
check if you wrote wn.mainloop() if you did then make a new line and just keep there it somehow fixed for me
@Hanzoxloww3 жыл бұрын
@@ssayorr do turtle.done() at the end
@ALLINONETV13 жыл бұрын
@@Hanzoxloww thanks
@Hanzoxloww3 жыл бұрын
@@ALLINONETV1 np
@tripplekidhacker6 жыл бұрын
i wanted to create a snake for my project but make it fun and interesting, could we add like graphics. custom tiled map or something?
@colwarsstudiobrickfilmandm85804 жыл бұрын
Dude you should write a book on turtle module it would be so helpful i bet you could make some good money.... coding books most of the time are like 30 bucks (united states dollars)
@TokyoEdTech4 жыл бұрын
I'm definitely thinking about it!
@iknees60564 жыл бұрын
Hello, i copied and pasted the code from github, but when i put it in pycharm, but when i play it, whenever i click a directional key, the snake teleports directly on the wall and you loose
@owenbrowne92884 жыл бұрын
Oooooooooooooooooooooooooooooooooof
@aryanpatel84764 жыл бұрын
I got a little error on my end. I followed the code EXACTLY and even was able to launch. My keys don't work and when I was trying to figure out why I see this: Traceback (most recent call last): File "/Users/my_username/Documents/Python Programs/my_folder/snake.py", line 76, in
@aryanpatel84764 жыл бұрын
@@TokyoEdTech line of code: wn.update() error code: File "/Users/my_username/Desktop/snakehame.pyw , line 76, in
@aryanpatel84764 жыл бұрын
@@TokyoEdTech and the snake does'nt move when i start up snake
@loganvaldez8896 жыл бұрын
For some reason I am getting AttributeError: 'TurtleView' Object has no attribute 'mainloop'
@loganvaldez8896 жыл бұрын
pastebin.com/xTui0tFJ Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/776CBE57-9756-443B-A18B-77E1A17DC5E6/Pythonista3/Documents/snake.py", line 12, in wn.mainloop() AttributeError: 'TurtleView' object has no attribute 'mainloop'
@loganvaldez8896 жыл бұрын
I'm using an IPad Pro. I think I'll just have to do it on a computer.
@human.earthling6 жыл бұрын
try using turtle.mainloop() instead.
@loobersoog6 жыл бұрын
Riaz Husain I love you
@theemacsen15185 жыл бұрын
paste this instead of wn.mainloop(): turtle.mainloop()
@letsthinkit4 жыл бұрын
Have you made a tutorial for asteroids?, I couldn't find one on your channe;. Thanks for all the content you make! It helps me as a 14 year old learning to code as a hobby.
@a_maxed_out_handle_of_30_chars6 жыл бұрын
Thanks to Reddit, I was wondering what to do after completing Python 3.
@samuelhirn14156 жыл бұрын
So I've been doing the basics of Python for a while now, and I can make text-based games and such. But I was wondering what to make, is using GUI the next step?
@alok74856 жыл бұрын
please make more games and also tell about how to increase difficulty level in game, how to make more levels in games and how to generate enemies more in pygame
@jezonfernando15834 жыл бұрын
I am not getting the Screen eventhough I'm working on a lap
@TokyoEdTech4 жыл бұрын
I’m happy to help, but I need to see the actual code. Please share your code via pastebin.com link so I can download and test it. To learn how, please watch this video and then get back to me: kzbin.info/www/bejne/gmekqImrqpuCabs Keep on codin’!
@mrspice20244 жыл бұрын
Hi plz help, I want to add sound on my turtle project but it doesnt play the sound its just play the warning win sound(I am using win) so plz can you help
@kurawtw4 жыл бұрын
to make the window stay there, you must use turtle.done() instead of the wn.mainloop() if you are using the newest version of pycharm. and the game is not finished, you must follow the 2nd tutorial until you finish all of the tutorials.
@TokyoEdTech4 жыл бұрын
It will probably depend on your version of Python, but if that works for you and others, great!
@kurawtw4 жыл бұрын
@@TokyoEdTech yep! im a kid programmer and this really helped me, thanks @TokyoEdTech!
@oster40833 жыл бұрын
hi! is there a way i can detect what the score is, im trying to see when the score reaches certent numbers
@oster40833 жыл бұрын
nvm i figured it out i used "if score == (number):"
@TokyoEdTech3 жыл бұрын
@@oster4083 Glad you figured it out!
@robertmawdsley84185 жыл бұрын
Hi Christian, Honestly in my first day of knowing anything about Python, this may be a silly question, but what "IDE( i think its called)" are you using in the video, i have python running in CMD and can do the basic Print("Hello World") but i am really struggling to follow the video when using CMD, for example when you create the wn.Mainloop() statement as above it allows you to compile code inbetween that and the wn.tracer(0), I may be so lacking in understanding and knowledge about all this but in CMD it does not allow me to do so, it doesnt even let me edit code, I am forced to backspace all and re-write, and it does not allow me to change where i am typing, I am sure that i am just ignorant of all this but could just use some help, not sure if you could assist, Thanking you in advance, Robert
@robertmawdsley84185 жыл бұрын
@@TokyoEdTech Thank You very Much Christian, I appreciate the help and time.
@nair385 жыл бұрын
Hello. I am stuck. I am trying to do the first part of just making the screen but it says that mainloop is not an attribute of Screen(). I am using Python 2 so maybe it doesn't work for Python 2.
@معمغربنا-د4ص4 жыл бұрын
thanks but its not work in windows or python 3.8 i coped in past in pycharm but not work
@bikashpandey86373 жыл бұрын
can you teach us how to add pause and quit button in the game
@TokyoEdTech3 жыл бұрын
Try this: kzbin.info/www/bejne/oau3naJ6ppZ5n7M
@budgiesandlizardstheguide4105 жыл бұрын
Hi - I'm building a small game where what you basically do is click on objects that appear randomly throughout the screen. Do you have a good tutorial for this?
@gimmecookies54054 жыл бұрын
I copied GUITHUB like 2 month ago and when i copy it now, it dosent work
@TokyoEdTech4 жыл бұрын
Don't know what to tell you.
@gimmecookies54054 жыл бұрын
@@TokyoEdTech :)
@gimmecookies54054 жыл бұрын
@@TokyoEdTech that was the answer i was looking for
@TokyoEdTech4 жыл бұрын
@@gimmecookies5405 Glad to hear it! lol
@kodaea2234 жыл бұрын
what kind of terminal are you using how do I get it?
@lqn72604 жыл бұрын
How do you run turtle in Visual Studio Code? I can only seem to get it to run code which isn't using a module.
@ndidiowonibi83276 жыл бұрын
Thanks i am using Windows 8.1 And i use Sublime text to right codes
@sirisgoated41734 жыл бұрын
Hey my background only stays for half a second and then disappears, why is that? Here is my code import turtle # Set up the screen wn = turtle.Screen() wn.title("Snake game by Saif Aldaour") wn.bgcolor("green") wn.setup(width=600, height=600) wn.tracer(0)
@TokyoEdTech4 жыл бұрын
You're missing the rest of the code - keep going.
@rakeshreddy13654 жыл бұрын
at last instead if wn.mainloop() use turtle.mainloop()
@nope83064 жыл бұрын
AttributeError: 'tuple' object has no attribute 'append'
@TokyoEdTech4 жыл бұрын
There is a link in the description labeled “NEED HELP?” Check that out and get back to me. Keep on codin’!
@makrophoenix30696 жыл бұрын
you are gold sir! glad i find you!
@makrophoenix30696 жыл бұрын
@@TokyoEdTech thanks for your reply, and just something to add, in this sea of python "programmers" on youtube you are the first to explain every line of code you type and every line of code is i would say compatible with all the versions of python(windows, linux, macOS). Just finished programming snake and believe me i could type whole line of code out of memory because you explained it perfectly. Thank you again.
@chloekimball5365 жыл бұрын
I feel the same way. He is absolutely amazing
@karamabumallouh85504 жыл бұрын
i wrote these code but the screen keeps closing after I run the code(it opens only for 1 sec the closes)how could I fix that?
@Zousky5 жыл бұрын
How do I upgrade to python 3 on mac? I downloaded python 3 but whenever I run turtle module, it goes back to 2.7
@jackhammerdevelopment31592 жыл бұрын
Hey there it seems someone has been plagiarising all your work and they uploaded a video claiming the code to be theirs
@TokyoEdTech2 жыл бұрын
Heya - yep, it happens pretty regularly. I'm totally OK with anyone using any of my code for any purpose, but I do appreciate a link back in the description. Everything I do is Creative Commons Attribution Share-Alike. Some people do ask - in particular I appreciate people who translate my videos, or use my code in their native language. Could you share a link to the code/content you found? Usually, when I ask, I get a positive response to my request for them to include a link. Thanks!
@jackhammerdevelopment31592 жыл бұрын
@@TokyoEdTech sure kzbin.info/www/bejne/kHe3c3qga9uUaJI is the link i hope the guy does the right thing and credit you but I don't have high hopes cause he literally pretended to wrote the whole code by himself all along but good luck.
@roxycamilo4 жыл бұрын
Hi, christian my son is 10 years old and he using python (spider anaconda) for his project at school, he wants to show in a you tube video the codding and the graphic turtle both at the same time (like you doing here), the problems is the recording only shows the codding part or the graphic turtle, not both at the same time, is he missing something? or whats the right way to show both at the same time thank you
@roxycamilo4 жыл бұрын
thank you , !! we will try that, my son watch your videos all the time, he start liking python because of your videos , thank you for all your work !!!
@g.t.10124 жыл бұрын
thanks for you time i did everything and works perfect, i like it, i add -turtle.register_shape("food.gif") -turtle.register_shape("slangenlichaam.gif") -turtle.register_shape("slanghoofd.gif") to change the snake and food and its looks cool Its so fun
@erdiksha81044 жыл бұрын
Sir i was trying to add sound..durring collision...and i did so...but no sound is coming...may os is mac... os.system("afplay Arrow flyby right to left .mp3") I hv attched in same file also....but no sound is coming...plzzz help me sir
@erdiksha81044 жыл бұрын
@@TokyoEdTech ok sir..👍😊
@erdiksha81044 жыл бұрын
Sir i renamed the file...and as per u said...but still no sound is coming
@erdiksha81044 жыл бұрын
@@TokyoEdTech I changed the name.. os.system("afplay hiss.mp3&") ...
@@TokyoEdTech Wn.update() t._update_data() Self.screen._incrementudc() raise Terminator turtle.Terminator .....this is showing in terminal win dow
@jalavl29726 жыл бұрын
When i do the run python file in terminal thing it just says "This is not an active python file" How should I make this a python file? Would be really appreciated if you could help!
@jalavl29726 жыл бұрын
@@TokyoEdTech OMG, it's the man himself! So glad I can talk to you, anyways I have not tried saving my files like that, lemme try and thank you very much!
@yesveryprofesionalnameyes60555 жыл бұрын
did you download the turtle module?
@theemacsen15185 жыл бұрын
python (FILENAME).py
@mmoonnaa3 жыл бұрын
line 8 NameError: name 'screen' is not defined What can I doooo ?
@anshul10473 жыл бұрын
the s of the screen should be capital. it should be s = turtle.Turtle()
@TokyoEdTech3 жыл бұрын
Thanks for helping out!
@Plasticarmylabs10 ай бұрын
wn.bgcolor("green") doesnt work it says it's not defined
@TokyoEdTech10 ай бұрын
Can you share all the code and the error message?
@Plasticarmylabs10 ай бұрын
@@TokyoEdTech the error message: Traceback (most recent call last): File "C:/Users/Win10R22h2/OneDrive/Desktop/Snake.py", line 3, in import turtle File "C:\Users/Win10R22h2/OneDrive/Desktop\turtle.py", line 3, in bgcolor("black") NameError: name 'bgcolor' is not defined the code: #simple Snake Game import turtle #settingu up the screen wn = turtle.Screen() wn.title("Snake") wn.bgcolor("green") wn.setup(width=600, height=600) wn.tracer wn.mainloop()
@TokyoEdTech10 ай бұрын
@@Plasticarmylabs It looks like you have a file called turtle.py on your desktop. Delete it.
@Plasticarmylabs10 ай бұрын
@@TokyoEdTech thanks so much that helped
@TokyoEdTech10 ай бұрын
@@Plasticarmylabs Sure thing - keep on codin'!
@arbazchaudhry97215 жыл бұрын
when i write main loop it says underfined
@saunaknandi18145 жыл бұрын
bro send the code first how can anyone will rectify ur mistake
@safabashe1705 жыл бұрын
i downloaded your code in description and run it in my computer but the snake does not move at all ... i have python 3.7 , pygame and i'm using pycharm ... what should i do ?
@walsand5 жыл бұрын
why is there no audio?, other videos on youtube have sound but for some reason not yours?
@walsand5 жыл бұрын
@@TokyoEdTech yep, restarted the whole computer, audio works on mobile though. so ill probably have it run on the phone while im doing this total kek
@juancruzarzani45024 жыл бұрын
Hi there , i have an issue here . Im just learning to code , im using the lastest build of python and i cant get to import turtle . The word import wont turn pink or show no signs of working (it is grey text ) and the program tells me that " import turtle " is an unused import command and recomends me to delete it . Pycharm gives me the option of using " __import__ " but when i use "__import__" turtle is not a option :/
@juancruzarzani45024 жыл бұрын
@@TokyoEdTech thanks a lot man , tomorrow ill continue whit the project then!
@divyakumar51614 жыл бұрын
Everything is excellent But in which app I will program this
@divyakumar51614 жыл бұрын
@@TokyoEdTech ohh thanks bro
@pranavguptaa4 жыл бұрын
I just found your videos,but i am not familiar with GUI in python,can you please suggest what topics should i learn for this playlist?
@TokyoEdTech4 жыл бұрын
If you already know basic Python, give this a shot - it will explain what you need to know.
@pranavguptaa4 жыл бұрын
@@TokyoEdTech Thanks a lot man🔥🔥
@TokyoEdTech4 жыл бұрын
@@pranavguptaa You're welcome.
@crake95104 жыл бұрын
is this on sublime text plz answer
@makingzebraop5 жыл бұрын
Which software u r using to code python?
@makingzebraop5 жыл бұрын
Pls tell fats
@Guyfamily17374 жыл бұрын
Can u tell me what ide you are using? Im using spider and when ever i try to run the code it says something like srry cant display game scrren
@louisapankow773 жыл бұрын
Hey TokyoEdtech, I dont know why, but no window is shown :( # Simple Snake Game in Python import turtle # Set up Screen wn = turtle.Screen() wn.title("Snake by Louisa") wn.bgcolor("green") wn.setup(600, 600) wn.tracer(0) wn.mainloop()
@louisapankow773 жыл бұрын
Python is only showing me this: /usr/bin/python3.8 /home/student_in/Game_snake_lp/main.py Traceback (most recent call last): File "/home/student_in/Game_snake_lp/main.py", line 4, in import turtle File "/usr/lib/python3.8/turtle.py", line 107, in import tkinter as TK ModuleNotFoundError: No module named 'tkinter' Process finished with exit code 1
@TokyoEdTech3 жыл бұрын
@@louisapankow77 Are you on Linux? If so, you'll need to install tkinter separately. Try Googling instructions for your operating system..
@PreludeSon5 жыл бұрын
very nice! By the way, how do I keep the game screen on? it closes on the first tutorial.
@tomthebigman74814 жыл бұрын
Stiofán Davies Thanks, was stuck.
@johankaruyan55365 жыл бұрын
Wait Why not Pygame ? isnt it easier there ?
@nuranaaliyeva66484 жыл бұрын
TokyoEdTech , are you writing code in Pycharm ?
@TokyoEdTech4 жыл бұрын
Nope - I’ve made a video about this exact topic. Enjoy! kzbin.info/www/bejne/apOvXp95hZenm8U
@mohammedshaddy37414 жыл бұрын
plz help, I am using eclipse IDE with pydev plug-in , it is not showing the green box at all
@ismailjabarti94536 жыл бұрын
What application are you using to write the code on?
@Player-fx3vt4 жыл бұрын
Hello, is turtle a default library or i need to download it ? My editior is not knowing what turtle is also shoud i use visualt studion or visual studio code , i mean does it matter? Thanks for the help
@TokyoEdTech4 жыл бұрын
It should come with Python. Here's a video about IDEs I use: kzbin.info/www/bejne/apOvXp95hZenm8U
@TokyoEdTech4 жыл бұрын
Thanks - good advice!
@thebest-fo1yr2 жыл бұрын
i have a problem, my python game window opens for a few seconds and closes immediately, what can i do?
@TokyoEdTech2 жыл бұрын
Share your code so I can't take a look.
@iggelopiggelo56136 жыл бұрын
I have Windows 10, i just downloaded python 3.7.2 but mine does not look like that. Mines just a black screen and it just lets me write. I don’t have numbers on the side and all of that. Help me please
@iggelopiggelo56136 жыл бұрын
Christian Thompson Thank you so much! Really thankful for Your response. Now i Can Finally code
@mostaphamansoor39694 жыл бұрын
the green screen with the snake opens but how will i move the snake,the directional keys dont work
@g.t.10124 жыл бұрын
watch hes next clips and he will tell everything its works
@TokyoEdTech4 жыл бұрын
You got it!
@ronaldmetube5 жыл бұрын
im having this error Traceback (most recent call last): File "C:\Users\mrsar\Desktop\RiyannRR\Codes\chess.py", line 2, in wn = turtle.Screen() AttributeError: 'module' object has no attribute 'Screen'
@nathangonzalez7394 жыл бұрын
im running the code on pycharm bc for some reason i cant run it on visual studio. and when i run the same code on pycharm the screen dosnt change color or size but it pops up. is there a difference in code in these different software ?
@nathangonzalez7394 жыл бұрын
Christian Thompson thanks bro 👍🏽 just started coding yesterday started watching your vids and some other ones and I’m already getting the hang of it thanks 🙏🏽
@nathangonzalez7394 жыл бұрын
@@TokyoEdTech ok i setup visual studio code and i finally got the green square to pop up, it turned out that it wouldn't pop up on VS bc i spelled width and height wrong lol. im super happy
@nathangonzalez7394 жыл бұрын
Christian Thompson ok got u 👌🏽
@liltxera2536 жыл бұрын
hi there, whats the IDLE you are using to code??
@artsketcherz28934 жыл бұрын
i am not able to find where has the code been run.i am using visual studio code itself.but cant find the output. please give me a solution.......
@TokyoEdTech4 жыл бұрын
Sorry, I don't know what to tell you - try finding a forum for Visual Studio Code problems.
@artsketcherz28934 жыл бұрын
@@TokyoEdTech ok thx
@galozer31794 жыл бұрын
i cant run this exact code Traceback (most recent call last): File "C:/Networks/work/test.py", line 1, in import turtle File "C:\Networks\Python3.8\lib\turtle.py", line 107, in import tkinter as TK ModuleNotFoundError: No module named 'tkinter' thanks!
@TokyoEdTech4 жыл бұрын
You may need to install tkinter separately - depends what OS you are on.