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

 

zbaharav@kehillah.org 91-review-light > kBracelet
prev  |  next  |  chance

A Kehillah Bracelet is composed of Units, where each Unit is made of two enclosing X symbols, and sequence of O's in between (the letter O). Thus, a sequence of length 3 is "XOOOX", and a sequence of length 1 is "XOX". Write a function that accepts the number of Units and their sequence length as integers, and return a string representing a Kehillah Bracelet.


kBracelet(1, 3) → "XOOOX"
kBracelet(2, 1) → "XOXXOX"
kBracelet(3, 0) → "XXXXXX"

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

public String kBracelet(int units, int sequence) { }

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

Copyright Nick Parlante 2017 - privacy