0

# Set the background color arcade.set_background_color(arcade.color.AMAZON)

    # Set the viewport boundaries
    # These numbers set where we have 'scrolled' to.
    self.view_left = 0
    self.view_bottom = 0
    **print(f"Total wall blocks: {len(self.wall_list)}")**

def on_draw(self):
    """
    Render the screen.
    """

Invalid Syntax keeps coming up when the code is run in it's entirety. I am usually quite good at fixing problems in Python code for my students but this is stumping me. We use Python 3.4.4

  • **print line is not correct python syntax. Also, there doesn't seem to be any code in your on_draw function. That would also throw a syntax error. Also, above your on_draw function you have some random indented code. Basically there is almost no valid syntax in your above code snippet. – user2263572 Aug 09 '18 at 02:44

1 Answers1

0

The f string syntax is only available in Python 3.6. Try

print("Total wall blocks: {}".format(len(self.wall_list)))

PS I'm assuming that you're using the ** around your print for emphasis. If not, remove them as well

aydow
  • 3,673
  • 2
  • 23
  • 40