Skip to main content

I'm an incumbent college student and I have a question about Python coding.

Comments

1 comment

  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Thanks for posting! This is a large amount of code to post without comments. Please comment your code so we can know your intention for each section.

    Also, your code is not posting with indentation, so that makes it pretty tricky to understand. =]

    Try something like this throughout the code:

     

    # This function causes the agent to.... by ... with function ...
    def on_chat2():
    agent_home()
    sort_block(). # calling this function changes the ...
    agent_home()

    Just as an initial question, you have variables which are not easily recognized. For example, you set cnt to 0, but then you have an if statement treating it as Boolean "if cnt:"

    It is always helpful at first use of a variable to clarify type and purpose.

     

    0

Please sign in to leave a comment.