Skip to content

Conversation

mgraonic
Copy link

@mgraonic mgraonic commented Feb 7, 2018

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Describe how you stored user input in your program? In variables only
How did you determine what operation to perform? Determined by user input and the gets method: gets solicits input and returns it as a string. Input was checked using regex for numeric entries. Once numeric entry was verified, the strings were converted to floats.
Do you feel like you used consistent indentation throughout your code? I think so
If you had more time, what would you have added to or changed about the program? Defined a method to check user input against select criteria and call the method after I prompt the user for input. This was the crux of the programming exercise. I also would add support for complex expressions

@tildeee
Copy link

tildeee commented Feb 12, 2018

Calculator

What We're Looking For

Feature Feedback
Takes in two numbers and an operator and performs the mathematical operation. x
Readable code with consistent indentation. x

Overall good calculator, functions as expected

The regular expression you use doesn't allow for decimal points! Because it only allows integers as valid input, I'm surprised you convert the numbers to floats for the math.

Good job using things like defining custom methods, case statements, and so on.

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