viernes, 13 de octubre de 2017

Ejemplos Python

from turtle import *

setup(640, 480, 0, 0)

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

from turtle import *

setup(450, 150, 0, 0)
title("Ejemplo de ventana")

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

from turtle import *

title("Ejemplo de ventana")

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

from turtle import *

setup(250, 100, 0, 0)
title("Ejemplo de ventana")
hideturtle()
dot(10, 0, 0, 0)
setup(450, 150, 0, 0)

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

from turtle import *

setup(450, 150, 0, 0)
screensize(10, 10)

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

from turtle import *

setup(150, 150, 0, 0)
screensize(300, 300)



from turtle import *

setup(450, 150, 0, 0)
screensize(400, 300)

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

from turtle import *

setup(250, 100, 0, 0)
screensize(100, 100)
hideturtle()
dot(10, 0, 0, 0)
screensize(200, 100)

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

from turtle import *

setup(450, 150, 0, 0)
screensize(300, 150)

showturtle()

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

from turtle import *

setup(450, 150, 0, 0)
screensize(300, 150)

goto(100, 0)

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

from turtle import *

setup(450, 150, 0, 0)
screensize(300, 150)

goto(100, 0)
hideturtle()

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

from turtle import *

setup(450, 150, 0, 0)
screensize(300, 150)

hideturtle()
goto(100, 0)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)

goto(0, 0)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)

goto(100, 50)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)

goto(100, 50)
goto(100, -50)
goto(50, -50)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)

goto(100, 50)
sety(-50)
setx(50)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)

goto(100, 50)
penup()
goto(100, -50)
pendown()
goto(50, -50)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)

goto(100, 50)
pensize(4)
goto(100, -50)
pensize(8)
goto(50, -50)

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

from turtle import *
setup(450, 200, 0, 0)
screensize(300, 150)
colormode(255)

pencolor(255, 0, 0)
goto(100, 50)
pencolor(0, 255, 0)
goto(100, -50)
pencolor(0, 0, 255)
goto(50, -50)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
colormode(255)

goto(100, 50)
dot(10, 255, 0, 0)
goto(100, -50)
dot(10, 0, 255, 0)
goto(50, -50)
dot(10, 0, 0, 255)
goto(0,0)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
colormode(255)

penup()
goto(100, 50)
dot(10, 255, 0, 0)
goto(100, -50)
dot(10, 0, 255, 0)
goto(50, -50)
dot(10, 0, 0, 255)
goto(0,0)

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(100, 0)
goto(100, 50)
goto(0, 50)
goto(0, 0)
end_fill()

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pencolor("red")
pensize(5)
begin_fill()
goto(100, 0)
goto(100, 50)
goto(0, 50)
goto(0, 0)
end_fill()

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(100, 0)
goto(100, 50)
goto(0, 50)
end_fill()

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(50, 50)
goto(100, -50)
goto(150, 0)
goto(0, 0)
end_fill()



from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(0, 75)
goto(100, 0)
goto(100, 75)
end_fill()

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(75, 0)
goto(75, 75)
penup()
goto(-100, 75)
pendown()
goto(-100,0)
goto(-25, 0)
end_fill()

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(75, 0)
goto(75, 75)
end_fill()
penup()
goto(-100, 75)
pendown()
begin_fill()
goto(-100,0)
goto(-25, 0)
end_fill()

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

from turtle import *

setup(450, 200, 0, 0)
screensize(300, 150)
title("www.mclibre.org")
hideturtle()

pensize(5)
fillcolor("red")
begin_fill()
goto(75, 0)
goto(75, 75)
goto(0,0)
penup()
goto(-100, 75)
pendown()
goto(-100,0)
goto(-25, 0)
goto(-100, 75)
end_fill()

No hay comentarios:

Publicar un comentario