נוספו מצגות מערכת השידורים נוסח מלא
מטרת הפרוייקט היא להשתמש ברצף תנועות ריקוד כדי ליצור ריקוד נחמד. שימוש באירועי עכבר, פוקנקציות, רשימות ואקראיות.
לשימושכם:
נשתמש בפאואר פוינט. יש לשמור את התמונות בסיומת gif. תחילה יש להוריד תמונות ממקור חינמי.
יש להעלות את התמונות לפאואר פוינט. לנקות רקע לבן ולשמור בתיקייה.
רצוי לשים את כל התמונות ואת קובץ התכנית באותה תיקייה.
import turtle
import time
import random
screen = turtle.Screen()
screen.setup(700,700)
screen.addshape("d1.gif")
screen.addshape("d2.gif")
screen.addshape("d3.gif")
screen.addshape("d4.gif")
screen.addshape("d5.gif")
screen.addshape("d5.gif")
screen.addshape("ball-1.gif")
screen.addshape("ball-2.gif")
screen.addshape("ball-3.gif")
screen.addshape("ball-4.gif")
screen.addshape("ball-5.gif")
screen.addshape("ball-random.gif")
screen.addshape("jance.gif")
t1=turtle.Turtle()
t1.pu()
t1.goto(-300,300)
t1.shape("d1.gif")
t1.speed(0)
dn=turtle.Turtle()
dn.pu()
dn.goto(200,400)
dn.shape("dance_now.gif")
dn.speed(0)
dn.write("", align="center", font=("Comic Sans MS", 60, "normal"))
dm=0
dancemoves=[]
def clickme1():
global dm
dancemoves.appand("d1.gif")
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme8():
for i in range(len(dancemoves)-1):
t6.shape(dancemoves[i])
time.sleep(1)
t1.onclick(clickme1)
t2.onclick(clickme2)
t3.onclick(clickme3)
t4.onclick(clickme4)
t5.onclick(clickme5)
t6.onclick(clickme6)
t7.onclick(clickme7)
t8.onclick(clickme7)
import turtle
import time
import random
screen = turtle.Screen()
screen.setup(700,700)
screen.addshape("d1.gif")
screen.addshape("d2.gif")
screen.addshape("d3.gif")
screen.addshape("d4.gif")
screen.addshape("d5.gif")
screen.addshape("d5.gif")
screen.addshape("ball-1.gif")
screen.addshape("ball-2.gif")
screen.addshape("ball-3.gif")
screen.addshape("ball-4.gif")
screen.addshape("ball-5.gif")
screen.addshape("ball-random.gif")
screen.addshape("jance.gif")
t1=turtle.Turtle()
t1.pu()
t1.goto(-300,300)
t1.shape("d1.gif")
t1.speed(0)
t2=turtle.Turtle()
t2.pu()
t2.goto(-300,200)
t2.shape("d2.gif")
t3.speed(0)
t3=turtle.Turtle()
t3.pu()
t3.goto(-300,100)
t3.shape("d3.gif")
t3.speed(0)
t4=turtle.Turtle()
t4.pu()
t4.goto(-300,0)
t4.shape("d4.gif")
t4.speed(0)
t5=turtle.Turtle()
t5.pu()
t5.goto(-300,-100)
t5.shape("d4.gif")
t5.speed(0)
t6=turtle.Turtle()
t6.pu()
t6.goto(0,0)
t6.shape("jdance.gif")
t6.speed(0)
t7=turtle.Turtle()
t7.pu()
t7.goto(300,400)
t7.shape("clear.gif")
t7.speed(0)
t8=turtle.Turtle()
t8.pu()
t8.goto(400,400)
t8.shape("dance_now.gif")
t8.speed(0)
dn=turtle.Turtle()
dn.pu()
dn.goto(200,400)
dn.shape("dance_now.gif")
dn.speed(0)
dn.write("", align="center", font=("Comic Sans MS", 60, "normal"))
dm=0
dancemoves=[]
def clickme1():
global dm
dancemoves.appand("d1.gif")
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme2():
global dm
dancemoves.appand("d1.gif")
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme3():
global dm
dancemoves.appand("d1.gif")
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme4():
global dm
dancemoves.appand("d1.gif")
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme5():
global dm
dancemoves.appand("d1.gif")
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme6():
global dm
moves=["d1.gif","d2.gif","d3.gif","d4.gif","d5.gif","ball-random.gif"]
t6.shape(random.choice(moves))
dm=dm+1
dn.write(dm, align="center", font=("Comic Sans MS", 60, "normal"))
def clickme7():
global dm
dm=0
dancemoves=[]
t6.shape("jdance.gif")
dm=dm+1
def clickme8():
for i in range(len(dancemoves)-1):
t6.shape(dancemoves[i])
time.sleep(1)
t1.onclick(clickme1)
t2.onclick(clickme2)
t3.onclick(clickme3)
t4.onclick(clickme4)
t5.onclick(clickme5)
t6.onclick(clickme6)
t7.onclick(clickme7)
t8.onclick(clickme7)