Skip to content

Conversation

@mulhoo
Copy link

@mulhoo mulhoo commented Feb 5, 2020

Assignment Submission: Calculator

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions:

Reflection

Question Answer
What went well in your code style, such as indentation, spacing, variable names, readability, etc.? What was lacking? I think the style, indentation, spacing, variable names and readability are all good. One thing I will look for in the future is ensuring my variable names are as clear as possible, including making some of them simpler if it makes sense to. Another thing is to DRY up the code a bit, especially when it comes to checking if the user inputted value is a float or not.
How did your code keep track of user input? My code stored them in different variables. For user_operator, it kept track of whether it was valid or not by comparing it to an array of possibilities. For the numbers, it kept track by storing the first number under num_1 and the second number under num_2. It verified that the values were valid by testing to see if they were floats.
How did your code determine what operation to perform? I defined methods for each operation at the beginning of the cod, so when it came to doing the calculation I just had to tell it "hey, look to exponify to know what to do with the two numbers!"
What opportunities exist to create small methods for this project? One for verifying if the user inputted number is a float/integer, rather than doing it twice for each number. What if my user wants to do math with more than 2 numbers together? Another for actually printing out the result instead of having to repeat myself would be good too
In the next project, what would you change about your process? What would you keep doing? Spend more time trying to DRY up sections of my code where possible.

@jmaddox19
Copy link

Calculator

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Correctly uses conditionals (if/else/elsif) ✔️
Correctly uses loops (while/until) ✔️
Correctly uses gets.chomp ✔️
Correctly uses variables ✔️
Correctly creates and uses custom methods ✔️

Functional Requirements

Functional Requirement yes/no
User can input two numbers and an operator and perform addition ✔️
User can input in two numbers and an operator and can perform subtraction ✔️
User gets feedback from the CLI when attempting to divide by zero, and the program does not give an error ✔️

Overall Feedback

Great work!

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 3+ in Code Review && 2+ in Functional Requirements ✔️
Yellow (Approaches Standards) 2 in Code Review && 2+ in Functional Requirements
Red (Not at Standard) 0,1 in Code Review or 0,1 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

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