from turtle import forward, left, speed, penup, pendown, exitonclick
n=5
a= 200/n
for i in range(5):
forward(a)
left(180-(180 * (1-2/n)))
penup()
forward(a*2)
pendown()
n=6
a= 200/n
for i in range(6):
forward(a)
left(180-(180 * (1-2/n)))
penup()
forward(a*3)
pendown()
n=7
a= 200/n
for i in range(7):
forward(a)
left(180-(180 * (1-2/n)))
penup()
forward(a*3)
pendown()
n=8
a= 200/n
for i in range(8):
forward(a)
left(180-(180 * (1-2/n)))
exitonclick()
from turtle import exitonclick, forward, left, penup, pendown
for n in range(5,9):
for i in range(n):
forward(200/n)
left(360/n)
penup()
forward(90)
pendown()
exitonclick()
from turtle import forward, left, pendown, penup, exitonclick
for n in 5, 6, 7, 8:
for i in range(n):
forward(200/n)
left(360/n)
forward(200/n)
penup()
forward(40)
pendown()
exitonclick()
for i in range(5):
print(i)
for i in range(5, 10):
print(i)
for i in range(5, 10, 2):
print(i)
for i in range(4, -1, -1):
print(i)
zatim_nejmensi = float(input("Zadej číslo: "))
for cislo in range(4):
nove_cislo = float(input("Zadej číslo: "))
if nove_cislo < zatim_nejmensi:
zatim_nejmensi = nove_cislo
print("Nejmenší číslo je: ", zatim_nejmensi)
print("Zadej pět čísel a já ti to nejmenší vypíšu.")
zatim_nejmensi = None
for cislo in range(5):
cislo = float(input("Zadej libovolné číslo:"))
if zatim_nejmensi == None or cislo < zatim_nejmensi:
zatim_nejmensi = cislo
print("Nejmenší zadané číslo je:", zatim_nejmensi)
print("Zadej pět čísel a já ti to nejmenší vypíšu.")
for i in range(5):
cislo = float(input("Zadej libovolné číslo:"))
if i == 0 or cislo < zatim_nejmensi:
zatim_nejmensi = cislo
print("Nejmenší zadané číslo je:", zatim_nejmensi)