about | help | code help+videos | done | prefs |
Write a method that returns a string indicating the parity of the positive numbers in the 'nums' array. For any non-positive numbers, use a "#" to indicate that it was not a positive number. For positive numbers, use a "E" if it has even parity, or an "O" (the letter) if it has odd parity. Even numbers have even parity and odd numbers have odd parity. Look at the test data for examples. test2023_09_08_HL_([27, 31, 55, 1, -5, -2, 0]) → "OOOO###" test2023_09_08_HL_([52, 17, 13, 9, 22, 100, 84, 55, 203]) → "EOOOEEEOO" test2023_09_08_HL_([-7, 23, 8, 0, 40, 41]) → "#OE#EO" ...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