-
Notifications
You must be signed in to change notification settings - Fork 49
Space - Chelsea #43
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?
Space - Chelsea #43
Conversation
CalculatorMajor Learning Goals/Code Review
Functional Requirements
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
SummaryNicely done, you hit all the learning goals here. Well done, this makes a good start at Ada. |
| end | ||
|
|
||
| def valid_number(number) | ||
| alphabet_array = [*'a'..'z', *'A'..'Z'] # https://stackoverflow.com/questions/4846853/generate-array-of-all-letters-and-digits |
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 work with the citation.
| alphabet_array = [*'a'..'z', *'A'..'Z'] # https://stackoverflow.com/questions/4846853/generate-array-of-all-letters-and-digits | ||
| operator_array = ["!","@","#","$","%","^","&","(",")","[","]","{","}","?","_","``","~","|","<",">",",",";",":","=","+","-","*","/"] | ||
| if number == 0 && number.to_i.to_s == number #for when people truly put in 0 | ||
| return "yes" |
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.
It would probably be better to return true if it is a number, and false if it isn't.
| end | ||
|
|
||
| case operator | ||
| when "add","+" |
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.
In general the when should be indented under the case statement.
Assignment Submission: Calculator
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions:
Reflection