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

Ampers: Abinnet Ainalem #45

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

Ampers: Abinnet Ainalem #45

wants to merge 1 commit into from

Conversation

Abiaina
Copy link

@Abiaina Abiaina commented Feb 8, 2018

Calculator

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Describe how you stored user input in your program? As an array or in a variable
How did you determine what operation to perform? By comparing strings
Do you feel like you used consistent indentation throughout your code? Yes I used the auto indent we created on the first day
If you had more time, what would you have added to or changed about the program? I would have added more operations to process and included the ability to compute more complex equations. Also my error message doesn't always show the user their exact error. This would be my first issue to address.

@CheezItMan
Copy link

Calculator

What We're Looking For

Feature Feedback
Takes in two numbers and an operator and performs the mathematical operation. Check
Baseline
Readable code with consistent indentation. Check
Extras User can enter values in an equation format.
Overview Nice work, nice use of .split to divide out the input. Your code was pretty readable and easy to follow.

user_entry = gets.chomp.downcase.split(" ")

numbers = [user_entry[0], user_entry[2]]
numbers.each do |num|

Choose a reason for hiding this comment

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

You might also check to ensure that the length of user_entry is at least 3.


if points_of_confusion.length > 0
puts "I was unable to solve your equation because:"
points_of_confusion.each {|issue| puts issue}

Choose a reason for hiding this comment

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

I like how you collected the errors into an array.

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