Skip to content

Conversation

@add2point71dots
Copy link

@add2point71dots add2point71dots commented Feb 10, 2017

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Describe how you stored user input in your program? I stored user input in variables. I didn't use any arrays for user input, but if I were to do math on more than two numbers, I would switch to arrays probably. I stored the options for operators in an array.
How did you determine what operation to perform? I used cases to determine what to do based on user input.
Do you feel like you used consistent indentation throughout your code? I think/hope so!
If you had more time, what would you have added to or changed about the program? I would like to take a shot at handling parenthetical input. I was also looking into a way to store the math operations as variables, so I wouldn't have to duplicate the math code for every operation. I came across some code where they stored the operators as symbols (like :+ and :*) and then used public_send to get them to do math, but I didn't have time to investigate that further. I'd like to play around with that to see how/if it works!

@kariabancroft
Copy link

Calculator

What We're Looking For

Feature Feedback
Takes in two numbers and an operator and performs the mathematical operation. Yep! Nice job using the case statement to get the answers. Nice job handling divide by zero.
Baseline
Readable code with consistent indentation. Indentation and white space look good
Extras
Validation Nice job creating a method to handle numeric validation as well as operation validation
Formula display Nice job displaying the formula using string interpolation in some different formats for different operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants