Python Turtle - Square Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 51

  • @ikhalifapro
    @ikhalifapro 6 ปีที่แล้ว +6

    This one video REALLY helped me understand the last 6 lectures we had in class since the start of the semester. I wish you were teaching our class!

  • @saigehaze8477
    @saigehaze8477 3 ปีที่แล้ว

    how would i get this code to repeat itself producing 10 squares with equal distance between them?

  • @ingydegmar2060
    @ingydegmar2060 3 ปีที่แล้ว

    Thanks man, I'm a beginner, helped me out a ton.

  • @tameralbouz610
    @tameralbouz610 4 ปีที่แล้ว +1

    Hey there! thanks a lot but what if I wanted black then red then black then red and so on for a polygon?

    • @GeekTutorials1
      @GeekTutorials1  4 ปีที่แล้ว +1

      Easy enough to do - you're going to have to change the angle size that the turtle turns at. In a square, we turn at 90-degree angles. If you are drawing something like a hexagon, you'll be turning at 60-degree angles.

  • @vivanshetty
    @vivanshetty 4 ปีที่แล้ว +2

    Thanks a lot !!!!! This was really helpful for me to get started with drawing in python!

  • @merediththesyrian3628
    @merediththesyrian3628 3 ปีที่แล้ว

    I can't fill the color red for my rectangle

  • @ItsYourTechDude
    @ItsYourTechDude 4 ปีที่แล้ว +5

    i am good at python and i used this in my program thanks!

    • @Redditard
      @Redditard 4 ปีที่แล้ว +2

      Are u on discord?

    • @GeekTutorials1
      @GeekTutorials1  3 ปีที่แล้ว

      @@Redditard I'm not. What do I need it for?

    • @Redditard
      @Redditard 3 ปีที่แล้ว

      @@GeekTutorials1 actually I had just started to learn python 10 months ago for my school so, I was looking for some help
      I didn't knew how to interpret Documentation at that time and now am at an intermediate level so yeah Docs help now lol
      Anyways ty :) this video help me a lot lol was fun messing around

  • @michaelstark5829
    @michaelstark5829 ปีที่แล้ว

    Really helpful, well explained

  • @carolwareing9374
    @carolwareing9374 3 ปีที่แล้ว

    Your tutorials are very easy to follow. But can you please tell me where to find the python libraries ie Turtle and Time etc and what is in them

  • @techmech7196
    @techmech7196 3 ปีที่แล้ว

    Which Idle u are using ,which Verision of software

    • @GeekTutorials1
      @GeekTutorials1  3 ปีที่แล้ว +1

      The official python IDLE. Version 3.8 I think it was.

    • @techmech7196
      @techmech7196 3 ปีที่แล้ว

      @@GeekTutorials1 Thank u ❣️

  • @jackgoff8712
    @jackgoff8712 3 ปีที่แล้ว

    How do you do this with triangles

    • @GeekTutorials1
      @GeekTutorials1  3 ปีที่แล้ว

      I see you found my triangle tutorial - just follow along with that.

  • @Mellowdy030
    @Mellowdy030 4 ปีที่แล้ว +1

    Quick question! So do brackets go after every line of code to close it off or select something? Or only after certain lines? Sorry, I'm very new to coding

    • @GeekTutorials1
      @GeekTutorials1  4 ปีที่แล้ว +2

      Brackets are used at the end of a function. Unlike a lot of other programming languages, Python doesn't need anything at the end of a line of code.

    • @Mellowdy030
      @Mellowdy030 4 ปีที่แล้ว

      @@GeekTutorials1 thanks for the help!

    • @larsverschoor
      @larsverschoor 2 ปีที่แล้ว

      @@GeekTutorials1 but why is it so slow and is there an arrow?

    • @GeekTutorials1
      @GeekTutorials1  2 ปีที่แล้ว

      @@larsverschoor The arrow is the "turtle" that draws the shapes. You can hide it. Put hideturtle() into your code.
      If you want to speed up your drawings, set the speed to 0 by writing speed(0) into your code.

    • @larsverschoor
      @larsverschoor 2 ปีที่แล้ว

      @@GeekTutorials1 okay, thanks!

  • @kairavkrishna7275
    @kairavkrishna7275 4 ปีที่แล้ว +1

    luv this vid ur a legend❤❤❤❤

  • @GurpreetSingh-fr4he
    @GurpreetSingh-fr4he 3 ปีที่แล้ว

    this is a great video!
    but mine just isnt working, it says: Traceback (most recent call last):
    File "C:/Users/lenovo/AppData/Local/Programs/Python/Python310/square.py", line 1, in
    window = turtle.Screen()
    NameError: name 'turtle' is not defined. Did you mean: 'tuple'?
    Help meeeeeee

    • @GeekTutorials1
      @GeekTutorials1  3 ปีที่แล้ว

      It works - there's probably just a spelling mistake. Look on my channel for an updated version of this video

  • @chaetys4818
    @chaetys4818 3 ปีที่แล้ว

    it says Traceback (most recent call last):
    File "C:\Users\kaant\AppData\Local\Programs\Python\Python39\game.py", line 13, in
    window = turtle.screen()
    AttributeError: module 'turtle' has no attribute 'screen'

    • @BlueRayJmonga
      @BlueRayJmonga 3 ปีที่แล้ว

      You probably type something wrong
      Its bean a month xd

  • @iisimplyamy8031
    @iisimplyamy8031 4 ปีที่แล้ว

    how do you change the size for the shape? sorry i'm new to python so i have lots of questions

    • @GeekTutorials1
      @GeekTutorials1  4 ปีที่แล้ว

      When you move the turtle forward to draw a line, make the number inside the brackets bigger. Try forward(200)

  • @gaoqingplatform3654
    @gaoqingplatform3654 4 ปีที่แล้ว +1

    Can you make a video to how to draw a rectangle?

    • @GeekTutorials1
      @GeekTutorials1  4 ปีที่แล้ว

      Done - just for you... th-cam.com/video/1TD2HTy6PFY/w-d-xo.html

  • @jaydensclips8137
    @jaydensclips8137 2 ปีที่แล้ว

    very cool

  • @oreaii1483
    @oreaii1483 ปีที่แล้ว

    Thanks

  • @vasilisektorasmitropoulos1771
    @vasilisektorasmitropoulos1771 4 ปีที่แล้ว

    it didnt work for me idk why

    • @GeekTutorials1
      @GeekTutorials1  4 ปีที่แล้ว

      What didn't work? Show me your code or error.

    • @vasilisektorasmitropoulos1771
      @vasilisektorasmitropoulos1771 4 ปีที่แล้ว

      @@GeekTutorials1 no just it didn’t make a square

    • @vasilisektorasmitropoulos1771
      @vasilisektorasmitropoulos1771 4 ปีที่แล้ว

      It made just a line at the edge and idk wht

    • @GeekTutorials1
      @GeekTutorials1  4 ปีที่แล้ว +1

      @@vasilisektorasmitropoulos1771 Hard to tell what's wrong without seeing your code. Possibly you missed a pendown() function that allows the turtle to keep drawing on the page. It will only be a small mistake.

  • @buddybob5502
    @buddybob5502 4 ปีที่แล้ว +2

    Thankyou

  • @Dragon-Slay3r
    @Dragon-Slay3r 2 ปีที่แล้ว

    Turtle Square face, don't be sad

  • @FEEXZY
    @FEEXZY 2 ปีที่แล้ว

    Traceback (most recent call last):
    File "/var/mobile/Containers/Data/Application/8B7F3B36-BA01-4A4D-8C16-9D268CB897F3/Documents/noname (1).py", line 1, in
    import turtle
    ImportError: No module named turtle

    • @GeekTutorials1
      @GeekTutorials1  2 ปีที่แล้ว

      I updated this tutorial - newer and easier code to follow. Check my channel for it