Skip to content

Leaves - Hallie #46

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

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

Leaves - Hallie #46

wants to merge 1 commit into from

Conversation

idhallie
Copy link

@idhallie idhallie commented Aug 7, 2019

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What went well in your code style, such as indentation, spacing, variable names, readability, etc.? What was lacking? Went well: My code validates to ensure input is an Integer and throws an error if not. I was able to consolidate the operation of all chosen calculations into a single method.

Lacking: My solution to use a float when necessary could have been more elegant. In order to do this, I simply converted one integer to a float in the division case so that the output would be an integer (always). This would have been better if it ONLY displayed as a float when needed. Also, I learned that I should have used 'return' in the cal
How did your code keep track of user input? I created variables for operation, num1, and num2 to capture user input.
How did your code determine what operation to perform? I made an array named "valid" with all acceptable operation inputs. Then, I created cases for each operation (ex. when 'add', '+') which make a call to the "calculate" method.
What opportunities exist to create small methods for this project? A method could have been created to validate when a float was needed.
In the next project, what would you change about your process? What would you keep doing? I'd like to get better about writing out the whole program in pseudo-code before coding. For this project, I tested out several different ways to structure the code before I simplified into the current version.

# 8/6/19
# Hallie Johnson

require 'colorize'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I appreciate the heck out of colorful error messaging.

@dHelmgren
Copy link

Calculator

What We're Looking For

Feature Feedback
Readable code with consistent indentation yes
Practices using variables appropriately yes
Practices using conditionals appropriately yes
If any, practices iteration appropriately yes
If any, practices using custom methods appropriately yes
Takes in two numbers and an operator and can perform addition yes
Takes in two numbers and an operator and can perform subtraction yes
The program handles divide when attempting to divide by zero yes

--- | ---
Overall | Great work on this first assignment! You've clearly demonstrated that you met the learning goals.

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