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

 

andersoniii.edwin@cusd80.com > weaveWordsBy2
prev  |  next  |  chance

Weaving Words2By2 - This is a new word game - Given two words of any length, write a program that will "weave" the words together. Take the two letters from String str1 and then two letters from String str2. Continue this pattern. If you have an odd length, concatenate a space on the end to make it even in length. Return the resulting "Weave Word". Example: "abc","ab" -> "ababc "


weaveWordsBy2("mom", "da") → "modam "
weaveWordsBy2("computer", "science") → "coscmpieutncere "
weaveWordsBy2("alphabet", "soup") → "alsophupabet"

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

public String weaveWordsBy2(String str1, String str2){ }

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: 162

Copyright Nick Parlante 2017 - privacy