Change "==" to "=":
fucntions def go_up(): Block.direction = "up" def go_down(): Block.direction = "down" def go_left(): Block.direction = "left" def go_right(): Block.direction = "right"