EasyManua.ls Logo

SunFounder PiSloth - Page 94

SunFounder PiSloth
113 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SunFounder pisloth
(continued from previous page)
try:
music.sound_effect_threading('./sounds/warning.wav')
except Exception as e:
print(e)
sloth.do_action('hook', 1, 90)
sloth.do_action('stand', 1, 90)
try:
music.sound_effect_threading('./sounds/warning.wav')
except Exception as e:
print(e)
sloth.do_action('walk backward boldly', 1, 90)
sloth.do_action('stand', 1, 90)
def sad():
try:
music.sound_effect_threading('./sounds/depress.wav')
except Exception as e:
print(e)
sloth.do_action('big swing', 1, 90)
def angry():
try:
music.sound_effect_threading('./sounds/error.wav')
except Exception as e:
print(e)
sloth.do_action('walk backward boldly', 1, 90)
sloth.do_action('stand', 1, 90)
def fail():
try:
music.sound_effect_threading('./sounds/depress2.wav')
except Exception as e:
print(e)
sloth.do_action('fall left', 1, 90)
def shy():
try:
music.sound_effect_threading('./sounds/talk3.wav')
except Exception as e:
print(e)
sloth.do_action('close', 1, 90)
time.sleep(1)
try:
music.sound_effect_threading('./sounds/talk2.wav')
except Exception as e:
print(e)
sloth.do_action('stand', 1, 90)
def main():
print("shy")
shy()
time.sleep(1)
sloth.do_action('stand', 1, 90)
time.sleep(2)
print("confuse")
(continues on next page)
90 Chapter 4. Play with Python

Related product manuals