Alienbot final else help

Hi i was checking the code after i add on the last else statement for no match intent. but however, as i added the last else statement, i realise that when i run the code and type in for e.g cube 3 i did not get the cubed responses but instead of the no match intent response. i tried to go back and remove the else statement and this time if i said cube 3 it does carry our the cube response.

is there something wrong with my code? Thanks

e.g cube 3 i did not get the cubed responses but instead of the no match intent response

I would put in a line of tracing statements to find where it’s not clicking. I personally like to do these type of steps at the interactive terminal by importing the py file and testing quickly there (although that’s not always convenient).

ok for some reason when i remove the ‘else’ statement directing to no match intent response and instead return the no match intent response outside and after the for loop, it works intended. Even though the tasks requires us to use else. hm…

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.