Это видео недоступно.
Сожалеем об этом.

How to create graphics using Python turtle 🐍🐢

Поделиться
HTML-код
  • Опубликовано: 23 авг 2022
  • This tutorial will create colorful graphics using the python turtle library.
    Let's have some fun by making some excellent graphics in python turtle.
    Related Tags
    python turtle graphics tutorial,
    python turtle tutorial,
    python turtle animation,
    python turtle projects,
    python turtle graphics animation,
    python turtle art,
    python turtle basics,
    python turtle beginner,
    python turtle cool designs
    Hashtags
    #python #graphics #programming #pythonturtle #turtle #coolgraphics #python #gui #coding #trending
    Learn python coding and programming for beginners. Here you will also learn to build small projects and scripts that will help you excel in your python programming skills.
    Let's build some cool things and have fun with python coding.
    This Channel will show you that you don’t have to be an expert computer programmer in order to start using programming languages!
    Python is a high-level programming language that is used in many different fields.

Комментарии • 269

  • @sivaraman8442
    @sivaraman8442 Год назад +255

    import turtle
    import colorsys
    t = turtle.Turtle()
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h+= 1/n
    t.color(c)
    t.left(1)
    t.fd(1)
    for j in range(2):
    t.left(2)
    t.circle(100)

    • @feepants4495
      @feepants4495 Год назад +4

      error

    • @sougatamandal8519
      @sougatamandal8519 Год назад +3

      mistake is = t = turtle.Turtle()

    • @Area_58
      @Area_58 Год назад +25

      Import turtle
      Import colorsys
      t=turtle.Turtle()
      s=turtle.Screen().bgcolor('black')
      t.speed(0)
      n = 70
      h = 0
      for i in range(360)
      c = colorsys.hsv_to_rgb(h, 1, 0.8)
      h+= 1/n
      t.color(c)
      t.left(1)
      t.fd(1)
      for j in range(2):
      t.left(2)
      t.circle(100)

    • @password6975
      @password6975 4 месяца назад

      🙏

    • @Sanjay54157
      @Sanjay54157 3 месяца назад

      super bro

  • @TheTalkingCatNL
    @TheTalkingCatNL Год назад +71

    These are easy and cool tutorials for beginners.

  • @Cuber1771
    @Cuber1771 7 месяцев назад +55

    For anyone having an AttributeError, I have a solution.
    If it’s in line 3, capitalize the t at the start of the second turtle like this:
    t = turtle.Turtle() and make sure to put the parenthesis’s at the end
    If it’s in line 4, there’s two possibilities. First, u forgot the parenthesis after screen
    Second, u didn’t capitalize the S in screen.
    Line 4 should be:
    s = turtle.Screen().bgcolor(‘black’)
    Hope that helped!
    If u have any other problems send the error message and I will try to help

    • @yeji.27060
      @yeji.27060 5 месяцев назад +1

      I have error in 8th line
      for i in range (360)

    • @Cuber1771
      @Cuber1771 5 месяцев назад

      @@yeji.27060 remove the space before the parenthesis and make sure to put the colon at the end

    • @user-xl8lf1tt1c
      @user-xl8lf1tt1c 5 месяцев назад

      Just look

    • @Cuber1771
      @Cuber1771 5 месяцев назад +3

      @@yeji.27060 remove the space between range and (360) and put a colon at the end. Should look like for i in range(360):

    • @rockyroadtv2547
      @rockyroadtv2547 5 месяцев назад

      I have error in line 4 says that s is not defined

  • @feepants4495
    @feepants4495 Год назад +29

    Here's the code that worked for me!
    import turtle
    import colorsys
    t = turtle.Turtle()
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h+= 1/n
    t.color(c)
    t.left(1)
    t.fd(1)
    for j in range(2):
    t.left(2)
    t.circle(100)

    • @sunilkumar33366
      @sunilkumar33366 11 месяцев назад +1

      Bro this doesn't work my mobile 😅

    • @renukaagrawal1081
      @renukaagrawal1081 9 месяцев назад +1

      How we run this code

    • @feepants4495
      @feepants4495 9 месяцев назад +1

      @@renukaagrawal1081 What?

    • @Mr.Hacker141
      @Mr.Hacker141 7 месяцев назад +1

      I think she means the place where you type your code

    • @markff6366
      @markff6366 6 месяцев назад

      IDLE​@@Mr.Hacker141

  • @bimlashahi3275
    @bimlashahi3275 10 дней назад

    The best one thank you so much❤

  • @eternaldivine47
    @eternaldivine47 6 месяцев назад +1

    Damn bro ⚡ its working tell us more with video how you learn this

  • @jesseclutterbuck6617
    @jesseclutterbuck6617 Год назад +5

    awsome work buddy. Id love to see more
    graphical stuff with python. maybe a graphical ui next ? 😊😊😊

    • @VerloreneErinnerung
      @VerloreneErinnerung Год назад

      That's cool and stuff, but has nothing to do with Turtle module

  • @VKB__12
    @VKB__12 2 месяца назад +1

    I did it🎉

  • @AllThingsAviationOfficial
    @AllThingsAviationOfficial 2 месяца назад

    Saved this as a .py file, looks amazing :D

  • @Cherry-gf6ow
    @Cherry-gf6ow 11 месяцев назад +9

    Bro this is amazing😍

  • @hiifukjg
    @hiifukjg 10 месяцев назад +2

    thaks worked 👍👍👍👍

  • @user-ij8rq3qg6o
    @user-ij8rq3qg6o 6 месяцев назад +1

    Pls give details on how u did it

  • @rockyroadtv2547
    @rockyroadtv2547 5 месяцев назад

    Amazing bro now I found my bug finally working

  • @PuppyPinky
    @PuppyPinky 2 месяца назад +3

    Pls tell how to stop it??

  • @sidd3987
    @sidd3987 5 месяцев назад

    You can also change circles size in the last line, t.circle(250) is the maximum size in my computer

  • @user-xw9ye9pp2n
    @user-xw9ye9pp2n 6 месяцев назад

    This is amazing ❤

  • @samwi53_0
    @samwi53_0 Год назад +5

    Doesn't Turtle already accept RGB values, why did we have to import the second module / library 'colorsys' ?

    • @NO992
      @NO992 Год назад +1

      He used colorsys to change color easily, using hsv values.

    • @samwi53_0
      @samwi53_0 Год назад

      @@NO992 *oh* that makes sense

  • @ellissb8574
    @ellissb8574 Год назад +3

    very nice😍😍😍😍

  • @Triplle..m
    @Triplle..m 5 месяцев назад

    thanks man ,,,i was trying to figure out what was wrong

  • @FLUX07
    @FLUX07 11 месяцев назад

    FUIYOH, Nice

  • @anoshijaz
    @anoshijaz 10 месяцев назад +1

    You can increase size of multi colour ball by increasing t.circle(100) value

  • @Techno-Beats2565
    @Techno-Beats2565 9 месяцев назад

    It was cool but when I used it it gave me another shape but that was cool to!

  • @PikapikaAkira
    @PikapikaAkira 3 месяца назад

    It's satifing

  • @BekBek-my2ru
    @BekBek-my2ru 2 месяца назад +1

    import math
    from turtle import *
    def hearta(k) :
    return 15*math.sin(k)**3
    def heartb(k) :
    return 12*math.cos(k)-5*\
    math.cos(2*k)-2*\
    math.cos(3*k)-\
    math.cos(4+k)
    speed(1000)
    bgcolor("black")
    for i in range(6000):
    goto(hearta(i)*20,heartb(i)*20)
    for j in range(5):
    color("#f73487")
    goto(0,0)
    done()

  • @rs_gaming_og9210
    @rs_gaming_og9210 2 месяца назад

    Thanks

  • @nihaarsatsangi2241
    @nihaarsatsangi2241 Месяц назад

    Runs perfectly!
    Thank you!

  • @03yashahire19
    @03yashahire19 11 месяцев назад +1

    Nice

  • @ReshmaBableshwar
    @ReshmaBableshwar 20 дней назад

    Can you code with help of vs code?

  • @igu642
    @igu642 8 месяцев назад

    ithing using python like using inbuilded functions from library

  • @XadichaUbaydullayeva
    @XadichaUbaydullayeva Год назад

    Wow🎉😮

  • @technicianpowerelectronics2755
    @technicianpowerelectronics2755 9 месяцев назад

    Superb 🎉

  • @syedusamabinsabir5307
    @syedusamabinsabir5307 26 дней назад

    Should we learn these codes or not
    Ps: I'm noob

  • @user-ps8ww6dw7h
    @user-ps8ww6dw7h 9 месяцев назад

    Worked 👍

  • @youtubeaccount1718
    @youtubeaccount1718 Год назад +10

    import colorsys
    import turtle
    t = turtle.Turtle() # Add parentheses after turtle.Turtle
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70.0 # Use a float value for smoother color transitions
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h += 1/n
    t.color(c)
    t.left(1)
    t.fd(1)
    for j in range(2):
    t.left(2)
    t.circle(100)

  • @ShakhzodUmarrov
    @ShakhzodUmarrov 9 месяцев назад +2

    How to run main

  • @devipriyakannan2856
    @devipriyakannan2856 2 месяца назад +3

    Guys, to stop it at exactly one rotation is to change the "I in range" from (360) to (72). Hope it helped 🎉😊

  • @Xghost_11Gamer11
    @Xghost_11Gamer11 22 дня назад

    Nice. *Crashes my pc* Not Nice😂

  • @user-cn6sj7zl4q
    @user-cn6sj7zl4q 5 месяцев назад

    Dahshat

  • @maninderbansal8560
    @maninderbansal8560 Месяц назад

    NameEror: name 'h' is not defined
    C=colorsys.hsv_to_rgb(h, 1, 0.8)

  • @nitishxess3616
    @nitishxess3616 Год назад +1

    How to fix installation problem of colorsys
    Can you help me

  • @Naksh_Patil.555
    @Naksh_Patil.555 Месяц назад

    Working write attentively.

  • @UniqueThoughts-AUDD
    @UniqueThoughts-AUDD 29 дней назад

    Is it possible in mobile.......In kaggle website 😊😊😊

  • @shrikanttalekar
    @shrikanttalekar Месяц назад

    On which app we I'll insert this code

  • @d116s
    @d116s 6 месяцев назад

    Bro I did it 🤩

  • @saikumarpappy3640
    @saikumarpappy3640 5 месяцев назад

    How to install the graphic application plss say me

  • @vstechiegamer5996lol
    @vstechiegamer5996lol Год назад +2

    I am not able to install colorsys via "pip install colorsys". It says ,"ERROR: Could not find a version that satisfies the requirement colorsys (from versions: none)
    ERROR: No matching distribution found for colorsys" in the terminal.

    • @SuperMarioGalaxySMG
      @SuperMarioGalaxySMG 10 месяцев назад

      sometimes the pip install has more to it than just pip install and the name, google it if u havent already

  • @shamai1099
    @shamai1099 8 месяцев назад

    What for about performance?)

  • @user-oi4sl1bp7c
    @user-oi4sl1bp7c Год назад

    tell me how to make it faster, what part of the code do i change

  • @Faizi971
    @Faizi971 6 месяцев назад +1

    Plz tell me this app name

  • @thetlmg
    @thetlmg Год назад +1

    i dont even need the code and i can do it lol

  • @jimmyk1998
    @jimmyk1998 Год назад

    greate video how do i get in touch with you?

  • @jshet
    @jshet Год назад +3

    Slow down

  • @nikabhallu
    @nikabhallu Год назад +1

    can you help me , i am running pythons on mac hut whenever I try any command with python its show killed". eg : python3 --version
    [1] killed 1427 python3 --version

  • @jesusleguizamon6566
    @jesusleguizamon6566 11 месяцев назад +2

    Hi sir, is there some options for make animations with python for some file glb and then save to mp4? Regards

  • @anonymous-65732
    @anonymous-65732 4 месяца назад

    witch browser design

  • @Gangotri_yatra
    @Gangotri_yatra 7 месяцев назад +1

    AttributeError at line 2 of your code: module 'turtle' has no attribute 'screen'

    • @Cuber1771
      @Cuber1771 7 месяцев назад

      Make sure you have Screen capitalized. Line 2 should be:
      turtle.Screen()bgcolor(‘black’)
      From what I can tell the problem is that the S in Screen isn’t capital
      P.S. that is actually line 4, the imports count as lines just a tip

  • @D_vlogs_official.
    @D_vlogs_official. 5 месяцев назад +1

    import colorsys t = turtle.Turtle() s = turtle.Screen().bgcolor('black') t.speed(0) n = 70 Like h = 0 for i in range (360): c = colorsys.hsv_to_rgb(h, 1, 0.8 h+= 1/n Dislike t.color(c) t.left(1) t.fd(1) for j in range (2): 256 t.left(2) t.circle(100)

  • @nirmikasethfreeeducation6201
    @nirmikasethfreeeducation6201 6 месяцев назад +1

    Which bersion is this please tell

    • @funwithpython8618
      @funwithpython8618  6 месяцев назад

      Hey, you can install the latest version of python

  • @yToddyn
    @yToddyn 8 дней назад

    🐢🐢🐢🐢

  • @ARTIDESIGLAM
    @ARTIDESIGLAM 9 месяцев назад +1

    Phone ma run nehey ho raha sir

  • @coinbg
    @coinbg 8 месяцев назад

    was this on IDLE or smthng else

  • @illegal8354
    @illegal8354 10 дней назад

    Version of python

  • @molicheng
    @molicheng Год назад +1

    how to stop it

  • @tuibchjvcgjvcgjkbvcuiibvhjvbj
    @tuibchjvcgjvcgjkbvcuiibvhjvbj 7 месяцев назад

    Hiw to draw this my turtlr only moving turtle

  • @Jaihindfitness-v3z
    @Jaihindfitness-v3z Месяц назад

    Bro this code print a only circle in red color

  • @yashyadav7816
    @yashyadav7816 11 месяцев назад

    Waht is use of h+=1/n

  • @Kakaraparthisandeep
    @Kakaraparthisandeep Месяц назад

    Shall it happens on phone

  • @UnFanDeDoom9
    @UnFanDeDoom9 3 месяца назад +1

    En qué te sirve eso

  • @lkfactsworld8155
    @lkfactsworld8155 4 месяца назад +1

    But bro i am getting line 1 error

    • @SashoSuper
      @SashoSuper 3 месяца назад

      turtle = turtle.Turtle is supposed to have () at the end.

  • @Sans________________________96
    @Sans________________________96 3 месяца назад

    Hi

  • @techaditya256
    @techaditya256 Год назад +1

    This video is speed

  • @Gangotri_yatra
    @Gangotri_yatra 7 месяцев назад +1

    NameError at line 2 of your code: name 'turtle' is not defined

    • @Cuber1771
      @Cuber1771 7 месяцев назад

      On the first line, t = turtle.Turtle() make sure to capitalize the second turtle like I have. Hope that helped
      P.S. the imports count as lines so that should be line 4
      Edit: just realized that may not be correct, so if it doesn’t work, make sure that u have the turtle module installed, can be done with pip install turtle in the terminal

  • @saidabbosxonqambarov8922
    @saidabbosxonqambarov8922 Год назад +58

    import turtle
    import colorsys
    t = turtle.Turtle
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h+= 1/n
    t.color(c)
    t.left(1)
    t.fd(1)
    for j in range(2):
    t.left(2)
    t.circle(10)
    free copy ;)
    but gives AttributeError: 'int' object has no attribute '_speed'

  • @laluuvlogs
    @laluuvlogs Год назад +2

    I manixs

  • @standard2104
    @standard2104 4 месяца назад

    song name?

  • @xxtrordinaryribbit5257
    @xxtrordinaryribbit5257 7 месяцев назад

    And I thought
    print ( 1 + 1)
    Was cool 😅

  • @owniiee1238
    @owniiee1238 2 месяца назад

    Can anyone tell where to type this I have install python 3.7.9 and I have type there but I don't know how to run it 😢😅

  • @xXX_unknown_xXX9
    @xXX_unknown_xXX9 18 дней назад

    the correct code is here
    import turtle
    import colorsys
    t = turtle.Turtle()
    s = turtle.Screen()
    s.bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1.0, 1.0)
    h += 1/n
    t.color(c)
    t.left(1)
    t.forward(1)
    for j in range(2):
    t.left(2)
    t.forward(i*2)
    turtle.done()

  • @tanmaybpsri
    @tanmaybpsri 2 месяца назад

    Which vergion is this

  • @stoic_sheep
    @stoic_sheep 7 месяцев назад

    How to export them as mp4 videos

  • @DK_CODING
    @DK_CODING 7 месяцев назад

    Line 4 in module error show h = 0

  • @Mr.Hacker141
    @Mr.Hacker141 7 месяцев назад

    Guys where did you type this code??

  • @celineguler
    @celineguler 8 месяцев назад

    why doesn't it work on colab?

  • @varietycrafts6772
    @varietycrafts6772 27 дней назад +2

    THIS WORKS IN PYTHON IDE SHELL
    import turtle
    import colorsys
    t = turtle.Turtle()
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range (360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h+= 1/n
    t.color(c)
    t.left(1)
    t.fd(1)
    for j in range(2):
    t.left(2)
    t.circle(100)

  • @logaboi731
    @logaboi731 Год назад +2

    "Pythin turtle"💀

  • @loopsgamer
    @loopsgamer Год назад +12

    source code!

    • @FabioGamingFG
      @FabioGamingFG Год назад +2

      Bro are you blind

    • @FabioGamingFG
      @FabioGamingFG Год назад

      @trupnupvr according to this, you say that the entire short didnt show any lines of code and was just a blank audio, as i said "bro are you blind" i was reffering to the source code literally being in the video

    • @YogurtGaming2
      @YogurtGaming2 Год назад

      @Trupnup sounds like a skill issue

    • @maazq9
      @maazq9 Год назад

      I don’t even know what to say here. But good luck.

    • @aneesh8796
      @aneesh8796 10 месяцев назад

      💀 nah you didn't

  • @karolzdziech8828
    @karolzdziech8828 7 месяцев назад

    Poland

  • @axag8659
    @axag8659 Год назад +2

    it says :*repl died unexpectedly*

    • @Cuber1771
      @Cuber1771 7 месяцев назад

      Sorry I’m late, here’s my diagnosis:
      Replit can’t run this code as it can’t open separate windows for the image. You will have to use another Python program such as an IDE or Python IDLE which can be downloaded on most devices

    • @axag8659
      @axag8659 7 месяцев назад

      oh okay@@Cuber1771

  • @aghora3845
    @aghora3845 Год назад +2

    why it is not working????

    • @feepants4495
      @feepants4495 Год назад

      Code is:
      import turtle
      import colorsys
      t = turtle.Turtle()
      s = turtle.Screen().bgcolor('black')
      t.speed(0)
      n = 70
      h = 0
      for i in range(360):
      c = colorsys.hsv_to_rgb(h, 1, 0.8)
      h+= 1/n
      t.color(c)
      t.left(1)
      t.fd(1)
      for j in range(2):
      t.left(2)
      t.circle(100)

  • @carpintiero1472
    @carpintiero1472 10 месяцев назад

    here is the correct code
    import turtle
    import colorsys
    t = turtle.Turtle()
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h += 1 / n
    t.color(c)
    t.left(1)
    t.fd(1)
    for j in range(2):
    t.left(2)
    t.circle(100)

  • @pareetachheda7982
    @pareetachheda7982 9 месяцев назад

    😢so fast 🤧

  • @yashyadav7816
    @yashyadav7816 Год назад +1

    Name error showing

  • @coinbg
    @coinbg 7 месяцев назад

    what do i do if my turtle windows is not responding

  • @GeorgeKahi
    @GeorgeKahi 20 дней назад

    very cool turtle code! i made a version similar to this. if anyone in the comments wants to check it out its here:
    import turtle
    import colorsys
    t = turtle.Turtle()
    g = turtle.Turtle()
    s = turtle.Screen().bgcolor("black")
    t.speed(0)
    n = 70
    h = 0
    f = 1
    for i in range (500):
    c = colorsys.hsv_to_rgb(h, 1, 1)
    h += 1/n
    t.color(c)
    t.left(1)
    t.forward(f)
    f += .1
    for j in range (2):
    t.left(2)
    t.circle(i * 2)

  • @Mr.Hacker141
    @Mr.Hacker141 7 месяцев назад

    It keeps telling me that there is a syntax error on line 8 which is 'for i in range(360)'

    • @Cuber1771
      @Cuber1771 6 месяцев назад

      Make sure u put the colon at the end and it should work

  • @retak22451
    @retak22451 11 месяцев назад

    00:00

  • @sriviswanatha3437
    @sriviswanatha3437 7 месяцев назад

    If i am doing in programiz i am getting indentation error can any one solve this

  • @louder_engines
    @louder_engines 6 месяцев назад

    import turtle
    import colorsys
    t = turtle.Turtle()
    s = turtle.Screen().bgcolor('black')
    t = turtle.Turtle()
    s = turtle.Screen().bgcolor('black')
    t.speed(0)
    n = 70
    h = 0
    for i in range(360):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h+=1/n
    t.color(c)
    t.left(45)
    t.fd(30)
    for j in range(1):
    t.left(20)
    t.circle(130)

  • @user-zg1se7xk5v
    @user-zg1se7xk5v Год назад

    which app are you using for this code

  • @giannipinot
    @giannipinot Год назад +1

    the video was too fast I could not copy