Académique Documents
Professionnel Documents
Culture Documents
hero.moveRight()
Object
Function
repeat forever.
to attack.
Loop Syntax:
Innite Loop
Dont forget the colon!
while True:
hero.attack(enemy)
4-space indent
Argument
Variable Denition
Example 1
Assignment Operator
enemy1 = Kratt
Variable
Value
Example 2
enemy1 = hero.findNearestEnemy()
Value
Variable Usage
Variable
hero.attack(enemy1)
Argument