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

Amber Lynn - Calculator - Edges #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

griffifam
Copy link

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Describe how you stored user input in your program? I stored user input by creating variables (first_number and second_number) and made them arguments in methods formed that would calculate the two using specified operator
How did you determine what operation to perform? Based on which word or operator the user entered, I created a variable for each and stored in it the method based on chosen operator
Do you feel like you used consistent indentation throughout your code? Yes, I wanted to make sure my code looked clean and readable.
If you had more time, what would you have added to or changed about the program? I would have utilized case statements in one area of my code.

@tildeee
Copy link
Collaborator

tildeee commented Aug 9, 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. Your indentation is off -- The contents of a method should be indented once within a method. The contents of a loop should be indented once within the loop. Indentation stacks, too. Let me know if you have questions!

Good job with calculator!

Great work practicing making methods, using methods, writing loops, and finding the correct ways to write conditionals.

However, your code has a few bugs:

  • Your program exits and breaks with an error if the user tries to divide by zero
  • You have a way of checking if the input is a digit, but I don't think it works as you expect! I think you're on the right track for checking it's a digit with regex, but the regex isn't quite right. Anyway, this is less important to me; I'm glad that the program doesn't break and halt execution in this case at the very least.

Also, overall, the indentation was lacking in this submission! I've tried to summarize my indentation expectations above, but let me know if you have questions.

Otherwise, this was a great submission. Good work

####################
in_progress = true

while in_progress
Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like the variable in_progress that is a boolean true or false. It reads really well as a human to say, "while in_progress is true, this loop should execute".

@griffifam
Copy link
Author

griffifam commented Aug 9, 2018 via email

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