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

 

twoUpTwoDown


Given a string, return a string identical to the first but the first two characters are upper-case, the next two lower-case, and so on. The length of the parameter will be an even number greater than zero.


twoUpTwoDown("keyboard") → "KEybOArd"
twoUpTwoDown("methacton?") → "MEthACtoN?"
twoUpTwoDown("HIGH SCHOOLs") → "HIgh SchOOls"

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

public String twoUpTwoDown( String s ){ }

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: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy