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

completed #124

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions letsdrill.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
def get_letter_grade(integer)

#Put your code here!
case integer
when 0..59
p "F"
Copy link

Choose a reason for hiding this comment

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

You shouldn't need to p print everything to return it, when you run the letsdrill.rb file it should have a set of expectations at the bottom that will output true or false. Try to remove all the p and get this working :)

when 60..69
p "D"
when 70..79
p "C"
when 80..89
p "B"
when 90..100
p "A"
begin
Copy link

Choose a reason for hiding this comment

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

Is this intended to stay in the method or was this some debugging code?

Nice job using a case statement

p "Error"
rescue => exception

else

end
end

end

def shortest_string(array)

#Put your code here!
p array.min_by{|val| val.length}

end

Expand Down