Hi, I am learning / teaching python using Makecode Arcade. I’m trying to understand what the generated code means by “Ballie: Sprite = None”.
What does Sprite = None even mean?
Code in Python:
@namespace
class SpriteKind:
Ball = SpriteKind.create()
def Make_Ball_Sprite():
global Ballie
Ballie = sprites.create(img("""
. . . . . b b b b b b . . . . .
. . . b b 9 9 9 9 9 9 b b . . .
. . b b 9 9 9 9 9 9 9 9 b b . .
. b b 9 d 9 9 9 9 9 9 9 9 b b .
. b 9 d 9 9 9 9 9 1 1 1 9 9 b .
b 9 d d 9 9 9 9 9 1 1 1 9 9 9 b
b 9 d 9 9 9 9 9 9 1 1 1 9 9 9 b
b 9 3 9 9 9 9 9 9 9 9 9 1 9 9 b
b 5 3 d 9 9 9 9 9 9 9 9 9 9 9 b
b 5 3 3 9 9 9 9 9 9 9 9 9 d 9 b
b 5 d 3 3 9 9 9 9 9 9 9 d d 9 b
. b 5 3 3 3 d 9 9 9 9 d d 5 b .
. b d 5 3 3 3 3 3 3 3 d 5 b b .
. . b d 5 d 3 3 3 3 5 5 b b . .
. . . b b 5 5 5 5 5 5 b b . . .
. . . . . b b b b b b . . . . .
"""),
SpriteKind.Ball)
Ballie.set_velocity(100, 100)
Ballie.set_position(80, 0)
Ballie.set_stay_in_screen(False)
Ballie.set_bounce_on_wall(True)
Ballie: Sprite = None
Make_Ball_Sprite()
Code in Blocks: