-
Notifications
You must be signed in to change notification settings - Fork 49
Time - Olga Patrakova #30
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
base: master
Are you sure you want to change the base?
Conversation
CalculatorMajor Learning Goals/Code Review
Functional Requirements
Overall Feedback
Additional FeedbackGreat work on this assignment! You did a great job breaking up the logic into small subproblems using custom methods. You gracefully handle invalid user input. Keep up the hard work. Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
| return number | ||
| end | ||
|
|
||
| puts "Please enter the first number " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a method or loop to get user input to DRY up your code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the code review and great comments. I'll do my best to dry up my code next time.
|
|
||
| # Check if user input is not a letter | ||
| def input_check(number) | ||
| until number.match(/\A[-]?\d+(\.\d+)?\z/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice use of regex :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Becca!
Assignment Submission: Calculator
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions:
Reflection