Skip to content

Queues - Janice Lichtman -Calculator#28

Open
J-C-L wants to merge 1 commit intoAda-C7:masterfrom
J-C-L:master
Open

Queues - Janice Lichtman -Calculator#28
J-C-L wants to merge 1 commit intoAda-C7:masterfrom
J-C-L:master

Conversation

@J-C-L
Copy link

@J-C-L J-C-L commented Feb 10, 2017

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Describe how you stored user input in your program? After verifying that the user data was of the correct type (a number or valid operation as appropriate), I stored the input in the variables num_1, num_2 and operation. The numbers were stored as floats.
How did you determine what operation to perform? I used a case/when conditional to decide which operation to perform. The cases were determined by the value of the variable "operation", as given by the user.
Do you feel like you used consistent indentation throughout your code? Yes, especially with atom's help ;-)
If you had more time, what would you have added to or changed about the program? I would have worked on adding support for parentheticals. Ex: 10 / (5 + 5)

@PilgrimMemoirs
Copy link

PilgrimMemoirs commented Feb 14, 2017

Calculator

What We're Looking For

Feature Feedback                                                                              
Takes in two numbers and an operator and performs the mathematical operation. Well Done
Baseline
Readable code with consistent indentation. Well Done
Extras
Great use of methods to break up functionality and provide semantic meaning to those chunks of code. To keep your case statement cleaner, the if statement on lines88-94 could be wrapped up in a method and called there instead. The methods doing the math could also be the ones running puts.
Good use of until loops to ensure valid user inputs, especially with the array of operations. Very elegant. So sassy when I try 0, love it! Nice implementation of the optional exponent!

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