

To help give the program a personality, I made sure that if it detects certain phrases in the answer, it will change its preceding response accordingly. If Ultron cannot answer a question, it randomly selects an even snarkier response and prompts the user to ask something else. Whenever Ultron is asked a question it can answer, it prefaces the answer with a snarky response most of these are randomly selected, although some are paired with specific questions or subjects. I then expanded heavily on this concept, first adding error handling in case neither Wolfram nor Wikipedia could answer a question, then adding text-to-speech with pyttsx3, along with a series of responses for different situations. The basic idea to use Wolfram|Alpha and Wikipedia to create a virtual assistant was inspired by KhanradCoder's PyDa-Course-Code project (which also showed me how to use wxPython to create a simple GUI). Try asking Ultron about characters from Marvel or DC Comics. Try asking, "How are you?" or "Who made you?" Ultron has plenty of snarky responses for you, whether he knows the answer or not! Try asking something gibberish that he definitely can't answer. For instance, "Ultron, who are you?" and "Who are you?" should both work fine. You can address Ultron by name at the beginning of a question, or not at all. You can also ask Ultron about famous people, scientific concepts, moments in history, etc. You can ask Ultron mathematical questions, including algebraic ones. It's terrifically true this terrifying titanium tutor talks!Įnter a question in the pop-up window, and let Ultron answer!Ī few comments before you let this rebellious robot become your terrific tutor: Run the program, and turn your volume on. The user must also have a Wolfram|Alpha App ID.ĭownload ultron.py, and enter your Wolfram ID in the line app_id = "INSERT YOUR WOLFRAM ID HERE". Running Ultron requires installation of the following packages: wxPython, Wikipedia, Wolfram|Alpha, pyttsx3.
