Personal tools
You are here: o studio 110 2016-17 tmp Inf 11 doku doku s py s upload Versuchnahdran1.py

Versuchnahdran1.py

Versuchnahdran1.py — Python Source, 2Kb

File contents


from turtle import *
bgcolor("black")
color("pink")
speed(15)
def dreieck (x):
    forward(x)
    left(119.5)
    forward(x)
    left(118)
    forward(x+2)
    left(119.5)

x=50
while x < 292:
    if x < 70:
        color("pink")
    else:
        dreieck(x)
        x=x+6
        if x < 90:
            color("light blue")
        else:
            dreieck(x)
            x=x+6
            if x < 110:
                color("white")
            else:
                dreieck(x)
                x=x+6
                if x < 130:
                    color("light green")
                else:
                    dreieck(x)
                    x=x+6
                    if x < 150:
                        color("green")
                    else:
                        dreieck(x)
                        x=x+6
                        if x < 170:
                            color("pink")
                        else:
                            dreieck(x)
                            x=x+6
                            if x < 190:
                                color("light blue")
                            else:
                                dreieck(x)
                                x=x+6
                                if x < 210:
                                    color("white")
                                else:
                                    dreieck(x)
                                    x=x+6
                                    if x < 230:
                                        color("light green")
                                    else:
                                        dreieck(x)
                                        x=x+6
                                        if x < 250:
                                            color("yellow")
                                        else:
                                            dreieck(x)
                                            x=x+6
    dreieck(x)
    x=x+6
   
    

# made by Levi und Emy

Document Actions