I have write a chat bot program by using Python 3.6. I study the syntax from several website and the most of my chat bot content is come from here: https://medium.com/analytics-vidhya/building-a-simple-chatbot-in-python-using-nltk-7c8c8215ac6e. This program have no problem for perform nltk on text. I plan to input physics knowledge to my chat bot. So far, the bot can answer all the things relate to physics such as Newton second law and even give out the formula. However, I plan to make this bot can perform simple calculation on equation such as F=m*a. I search so many website in google in these few days, yet still cannot find the solutions. I also got search in stack overflow, and yet the nearest post to my answer seems not an answer for me. (how do I add a calculator to my chatbot). If it is for normal python script, I know how to write it and I think I will write in this way:
mass = input("input the mass of an object")
acceleration=input("input the acceleration of an object")
print("Force of the object: ", mass*acceleration "Newton.")
However, how am i gonna implement this thing in chat bot? So far the only way i can think is using chat bot platform like chatterbot.AI, Dialogflow, Chatfuel all this. If I only want use python, how can I improve the chatbot, so it can perform the calculation that I have stated above. Thank you for stack overflow experts helpings and advises.