Skip to content

Conversation

@BASIC-Belic
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 as variable, strings in the case of operand, and int for numbers).
How did you determine what operation to perform? Originally used until loop and typed out valid options. Then, I saw Hayden's code, and it was much cleaner to store valid options in an array.
Do you feel like you used consistent indentation throughout your code? Not sure. I think I did?
If you had more time, what would you have added to or changed about the program? I would have the program start over. I would also make the loop for checking valid number input happen/work.

@tildeee
Copy link
Collaborator

tildeee commented Aug 12, 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. x

Great work on this project, Chantelle!

The code looks good at the project works as expected, with the exception that your program accepts all input for numbers, including input like clown or asdf. That being said, everything else looks good.

I would get out of the habit of using system("clear")-- our projects at Ada will not have a requirement to clear the screen. system() is a powerful command that could affect more things that we'd like, so I'd get out of the habit of it now!

I like that your method calculate returns the string of the result, so that its result gets printed in the screen later. I think that's really clever :)

I don't have any other comments, besides good work!

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