about | help | code help+videos | done | prefs |
Write a method that returns the longer of the two input parameter strings. If the two strings are the same length, return "<same>" to indicate that. Note that returning "<same>" does NOT mean that the strings are the same, only that they are the same LENGTH. Look at the test data for examples. quiz2021_10_12_APSLHL_longer("Punny joke.", "An ox named Abe is Abe Ox. But Abe Ox is not made out of cardboard.") → "An ox named Abe is Abe Ox. But Abe Ox is not made out of cardboard." quiz2021_10_12_APSLHL_longer("Plate Leopard Easy Arm Spray Eagle Gate Empty Tarp Thing Hamper Igloo Steve Ramp Ice Gait Hat Temper", "it") → "Plate Leopard Easy Arm Spray Eagle Gate Empty Tarp Thing Hamper Igloo Steve Ramp Ice Gait Hat Temper" quiz2021_10_12_APSLHL_longer("Much longer string", "short string") → "Much longer string" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy