Skip to content

Conversation

@denisseai
Copy link

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? The comments will help with the readability of the code. The display messages will aid the user on what to do. I tried to space methods a bit to much just for the beginning of my learning to have a clear and organized mind.
How did your code keep track of user input? I used variable names that made sense to me.
How did your code determine what operation to perform? The code will verify what was submitted by the user with a method. It will compare what was submitted with an array of acceptable input.
What opportunities exist to create small methods for this project? They can be reused in the code.
In the next project, what would you change about your process? What would you keep doing? I will try to keep it looking clean and easy to read. For next project I will try to use more built-in ruby methods.

@CheezItMan
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 ✔️, good basic 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 ⚠ It just returns 0 if the user tries to divide by 0.

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 3+ in Code Review && 2+ in Functional Requirements ✔️

Code Style Bonus Awards

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

Quality Yes?
Perfect Indentation ⚠ Some indentation issues here.
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

Summary

Nice work, you hit the learning goals here. This makes a good start at Ada.

calculator.rb Outdated
Comment on lines 60 to 61
puts "You have chosen to add " "#{first_number} with #{second_number}"
result = addition(first_number, second_number)

Choose a reason for hiding this comment

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

The code inside the when should be indented

calculator.rb Outdated
Comment on lines 66 to 67
puts "You have chosen to divide " "#{first_number} by #{second_number}"
if second_number == 0

Choose a reason for hiding this comment

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

Odd indentation here.

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