Skip to main content

Agent detect python

Comments

3 comments

  • Cathy Cheo-Isaacs

    Hi Francesca Germer! Which Python are you using, MakeCode or Notebooks?

    I had the same error in MakeCode, so I restarted with the same exact code that time, it worked.

    If you are coding Python in Notebooks, the commands and syntax are a little different. Hope this helps!

     
    0
  • Francesca Germer

    hmmm ok. I'm using notebooks. Is there a way to use inspect to detect just whether there's a block there or not? Not a specific block type, I just want to know if there's something there.

    0
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Francesca Germer

    I believe that agent.detect("down") returns a true/false value for whether a block is present. =]

    0

Please sign in to leave a comment.