0% found this document useful (0 votes)
7 views

Programs Python

The document uses the turtle library in Python to draw a face with eyes, a nose and a smile by having the turtle pen move and turn specified amounts of degrees and distances multiple times in for loops.

Uploaded by

ejaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Programs Python

The document uses the turtle library in Python to draw a face with eyes, a nose and a smile by having the turtle pen move and turn specified amounts of degrees and distances multiple times in for loops.

Uploaded by

ejaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

# import turtle library

import turtle

my_wn = turtle.Screen()

turtle.speed(2)
for i in range(30):

turtle.circle(5*i)

turtle.circle(-5*i)

turtle.left(i)

turtle.exitonclick()

------------------------

import turtle

turtle.pensize(4)

turtle.speed(3)

#left eye

turtle.penup()

for i in range(5):

turtle.pendown()

turtle.forward(25)

turtle.right(90)

#right eye

turtle.left(90)

turtle.penup()

turtle.forward(50)

for i in range(4):
turtle.pendown()

turtle.forward(25)

turtle.right(90)

#nose

turtle.right(90)

turtle.penup()

turtle.forward(35)

turtle.pendown()

for i in range(2):

turtle.forward(25)

turtle.right(90)

turtle.forward(50)

turtle.right(90)

#smile

turtle.forward(25)

turtle.left(90)

turtle.penup()

turtle.forward(25)

turtle.pendown()

turtle.right(135)
turtle.forward(30)

turtle.right(45)

turtle.forward(60)

turtle.right(45)

turtle.forward(30)

----------------------

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy