about | help | code help+videos | done | prefs |
Emmy eats spinach and string beans on alternate nights, except on Saturdays when she eats both. Days are numbered: Sunday = 0, Monday = 1, and so on. Ms. Delaney says "use the 'return X' statement to return the correct meal item as a string, in place of 'X'." [HINT: the % (mod) operator returns the remainder of a division. For example: 5%2 = 1. 8%2 = 0.] dinner(0) → "spinach" dinner(1) → "string beans" dinner(2) → "spinach" ...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: 105 Post-solution available
Copyright Nick Parlante 2017 - privacy