Lezione 23 ottobre
import math
import turtle
def stampa_pippo(nome):
print("ciao %s " % (nome))
print("come stai?")
def somma(a,b):
c=a+b
return c
def quadrato(lato):
for i in range(4):
turtle.forward(lato)
turtle.right(90)
#soggetto=input("Inserisci il nome ")
#stampa_pippo(soggetto)
risultato=somma(3,5)
print(risultato)
print(math.pi)
print(math.pow(2,4))
print(2**4)
aaa = "Ford"
print(aaa[1:1])
#turtle.forward(100)
#turtle.right(90)
#turtle.forward(100)
#turtle.right(90)
#turtle.forward(100)
#turtle.right(90)
#turtle.forward(100)
turtle.fillcolor("green")
turtle.begin_fill()
quadrato(25)
turtle.end_fill()
turtle.penup()
turtle.goto(-30,-40)
turtle.pendown()
turtle.pencolor(255,0,0)
quadrato(25)
import turtle
turtle.penup()
turtle.goto(20,30)
turtle.pendown()
turtle.pencolor(30,200,10)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.forward(100)
turtle.right(90)
turtle.pencolor(130,20,100)
turtle.forward(100)
turtle.right(90)
turtle.pencolor(130,130,130)
turtle.forward(100)
turtle.right(90)
turtle.pencolor(0,0,0)
turtle.forward(100)
turtle.end_fill()
turtle.circle(20)