about | help | code help+videos | done | prefs |
Write a method that returns one of the strings "positive", "negative", or "zero" depending on what sign the value of 'num' has. For example, if 'num' is any negative number, return "negative". If 'num' is any positive number, return "positive". If 'num' is neither positive nor negative, return "zero". Look at the test data for examples. quiz2023_09_15_APP1SLHL_posNegZero(7) → "positive" quiz2023_09_15_APP1SLHL_posNegZero(0) → "zero" quiz2023_09_15_APP1SLHL_posNegZero(-3) → "negative" ...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