Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Queues - Marisol Lopez - Calculator.rb #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marisol-lopez
Copy link

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Describe how you stored user input in your program? I stored my numbers in two variables and then stored my operation in 4 different methods to be called upon later for the actual math operation.
How did you determine what operation to perform? I made four methods, one for add, subtract, multiply, and divide. I made a case statement that would store keywords and symbols as strings for each operation, so that when something that matched was entered by the user it would print out my statement and the result of the method that had been interpolated.
Do you feel like you used consistent indentation throughout your code? Yes.
If you had more time, what would you have added to or changed about the program? I wanted to try and use one method to perform all 4 functions. My thought process was to have three parameters, two numbers (inputted by the user) and then the operation. I was able to do it if the user inputted the symbol for the operation, but if they wrote out the wrote for the operation, it would not complete the math.

@kariabancroft
Copy link

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
Functionality Program did not respond when I put in a number instead of an operator, it still asked for number but nothing was output. Does line 28 need .to_s called on it?
Nice use of rescue and retry. Clean, easy to read case statement!

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