Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
This code deals with "what is ... " question
What's in it: 2 functions: - determineUserInput( ) - This will be built bigger as it holds which questions are said - reformatSentence( ) - This formats the user's inputted sentence to just an equation. - The format happens in 2 ways: - the equation has symbols eg. 1 + 1 * 2 - the equation has words eg. 1 plus 1 times 2 the "what" part Here's how the code works: on the bottom, under testing zone, the code asks for the user's input. then, the user's input is passed to the determineUserInput() function (i only worked on the "what" side so ... that's what im gonna focus on) - the program executes the "what" side (you can see it from the code above) - it checks if the "sentence" has numbers - asking questions like "What is 1 + 1" - it checks if the user used symbols or words - the "sentence" and what was user (symbols or words) are passed to the reformatSentence() function - the function checks which one was used - the function returns the "equation" - the function, determineUserInput(), returns answer = the answer as float - print(answer) HOWEVER, something is not right and I've been staring at my computer to find the mistake .... help me ;-;
- Loading branch information