Google logo using Turtle in Python
crossorigin="anonymous">
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="-fb+5q+57-cn+4i"
data-ad-client="ca-pub-1921033592828510"
data-ad-slot="3834450293">
type="adsense"
data-ad-client="ca-pub-1921033592828510"
data-ad-slot="9938987353"
data-auto-format="rspv"
data-full-width="">
crossorigin="anonymous">
style="display:block"
data-ad-client="ca-pub-1921033592828510"
data-ad-slot="1917096919"
data-ad-format="auto"
data-full-width-responsive="true">
style="display:block"
data-ad-format="fluid"
data-ad-layout-key="-fb+5q+57-cn+4i"
data-ad-client="ca-pub-1921033592828510"
data-ad-slot="3834450293">
data-ad-client="ca-pub-1921033592828510"
data-ad-slot="9938987353"
data-auto-format="rspv"
data-full-width="">
crossorigin="anonymous">
style="display:block"
data-ad-client="ca-pub-1921033592828510"
data-ad-slot="1917096919"
data-ad-format="auto"
data-full-width-responsive="true">
Google logo using Turtle in Python
Input (Code) :-
import turtle as g
g.bgcolor("black")
g.color('Royal Blue')
g.pensize(5)
g.speed(5)
## first circle {red color}
g.forward(120)
g.right(90)
g.circle(-150,50)
g.color('dark green')
g.circle(-150,100)
g.color('orange')
g.circle(-150,60)
g.color('red')
g.begin_fill()
g.circle(-150,100)
g.right(90)
g.forward(50)
g.right(90)
g.circle(100,100)
g.right(90)
g.forward(50)
g.end_fill()
g.begin_fill()
## second circle {yellow color}
g.color("orange")
g.right(180)
g.forward(50)
g.right(90)
g.circle(100,60)
g.right(90)
g.forward(50)
g.right(90)
g.circle(-150,60)
g.end_fill()
# third circle {green color}
g.right(90)
g.forward(50)
g.right(90)
g.circle(100,60)
g.color('dark green')
g.begin_fill()
g.circle(100,100)
g.right(90)
g.forward(50)
g.right(90)
g.circle(-150,100)
g.right(90)
g.forward(50)
g.end_fill()
# Draw last circle
g.right(90)
g.circle(100,100)
g.color('royal blue')
g.begin_fill()
g.circle(100,25)
g.left(115)
g.forward(65)
g.right(90)
g.forward(42)
g.right(90)
g.forward(124)
g.right(90)
g.circle(-150,50)
g.right(90)
g.forward(50)
g.end_fill()
g.done()
Output :-
Watch this Short for result :- https://youtube.com/shorts/FXZupSWE310?feature=share
Comments
Post a Comment