#Define the functions for Dance Program
def yoyo(speed, waitTime):
    forward(speed, waitTime)
    backward(speed, waitTime)
    stop()

def wiggle(speed, waitTime):
    motors(-speed, speed)
    wait(waitTime)
    motors(speed, -speed)
    wait(waitTime)
    stop()

# The Dance Program
def dance():
    print "Running the dance routine..."
    yoyo(0.5, 0.5)
    wiggle(0.5, 0.5)
    yoyo(0.5,1)
    wiggle(0.5,1)
    stop()
    print "....Done"

dance()

--------------------------------------------------------------
def yoyo(speed, waitTime):
    forward(speed, waitTime)
    backward(speed, waitTime)
    stop()

def wiggle(speed, waitTime):
    motors(-speed, speed)
    wait(waitTime)
    motors(speed, -speed)
    wait(waitTime)
    stop()

def dance():
    print "Running the dance routine..."
    yoyo(0.5, 0.5)
    wiggle(0.5, 0.5)
    yoyo(0.5,1)
    wiggle(0.5,1)
    stop()

def main():
	print "Running the dance routine"
	 
	for danceStep in range(10): 
		dance()

	print "...Done"

//Also try "while timeRemaining(10)" and "while True:"