Working implementations besides the final BYE test. #78
Open
robert-smith-07 wants to merge 1 commit intopaircolumbus:masterfrom
robert-smith-07:master
Open
Working implementations besides the final BYE test. #78robert-smith-07 wants to merge 1 commit intopaircolumbus:masterfrom robert-smith-07:master
robert-smith-07 wants to merge 1 commit intopaircolumbus:masterfrom
robert-smith-07:master
Conversation
…heck for both the message and exit function being called in the same test.
jaybobo
reviewed
Oct 12, 2017
| def run(input) | ||
|
|
||
| #Implement your code here | ||
| if input % 3 == 0 && input % 5 == 0 |
Member
There was a problem hiding this comment.
this can be combined in an if..elsif or case statement. that way you can avoid the explicit return statements.
you won't see explicit returns a lot in ruby except in the case of early returns.
def fn
return true if condition
false
end
Member
There was a problem hiding this comment.
How could you solve this using ruby's .tap method?
https://ruby-doc.org/core-2.4.2/Object.html#method-i-tap
| end | ||
|
|
||
| # if input is UPPERCASE say one thing, if not, say another | ||
| if input == input.upcase |
Member
There was a problem hiding this comment.
see my notes about fizzbuzz. you can clean this up quite a bit without using explicit returns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not sure how to check for both the BYE SONNY message and exit function being called in the same test.
@jaybobo