Table of Contents

Say and Think with Sprite – Python

Example Description
The example demonstrates how to use say and think of sprite in a project.

Code

sprite = Sprite('Tobi')
import time

sprite.say("Saying for 2 seconds", 2)
sprite.say("Saying forever")
time.sleep(2)

sprite.think("Thinking for 2 seconds", 2)
sprite.think("Thinking forever")

Output