id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

amjadm@miamioh.edu assignment3part1 > evenOddEqual
prev  |  next  |  chance

Given a sequence of digits as a string, return true if the number of even and odd digits are equal. For instance: in "123456" there are 3 even digits and 3 odd digits, so the result should be true. If the given string is empty, the answer would be true.


evenOddEqual("1") → false
evenOddEqual("12") → true
evenOddEqual("123") → false

...Save, Compile, Run (ctrl-enter)

public boolean evenOddEqual(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 150

Copyright Nick Parlante 2017 - privacy