Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Count Emptiness moveNSteps function problem Solved


This is my code

# Count the whitespace on both sides of a riddle.

# This function moves the hero N steps right.
def moveNSteps(n):
    hero.moveXY(hero.pos.x + 8 * n, hero.pos.y)

# Read the riddle.
enemies = hero.findEnemies()
enemy = hero.findNearest(enemies)
riddle = enemy.riddle
# Trim whitespace from both sides and store in a variable
trimmed = riddle.trim()
# Find the difference between the lengths:
d = riddle - trimmed
# Use the result and moveNSteps function to move to the spot:
# Say something there!

And there is an error that pops up that says

and I makes no sense to me because I am sure that it has two inputs can someone help me.


I just needed the length so I was just being dumb. :persevere: