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

zbaharav@kehillah.org bootcamp

Description:Bootcamp

Day 5: for()

1. Do the questions from yesterday with a for() loop. Much easier usually than with a while().

2. Create an ASCII art shape like the below:

N-rows. Example for N=5:

*             *
**         ** 
***      *** 
****   **** 
********** 
<\pre>

Day 4: While

Today things are getting a little more tricky.

BUT, you got the simple syntax under your belt already, so you can focus on the logic and common patterns.

repeatSeparator  // Simple: Do this with While() loop to get familiar with the count-pattern

plusOut  // More natural to do with a for() loop, but you need to do it with a while(). I would suggest do it with a while as a for loop: Have a counter, and go over all elements of the String.

More challenging:

zipZap  // Not easy! You need to do this with While and indexOf() patterns.

Day 3: Strings

conCat  // remove double char

minCat  // shorten appropriately

without2  // String equals and modification

replaceAbyB H   // Replacing an element in String

Day 2: Logic + Strings

// Please use only the operations we recommend: length, +,substring, indexOf (<- two forms of this), compareTo, equals

loneTeen H   // Logic (if's)

extraEnd  // replicate first

frontBack H   // exchange first and last

frontAgain  // equals, or compareTo

Day 1: If / Logic

in1020 H   // Single if statements

makes10 H   // Maybe combine if statements

in3050 H   // Similar to above, More if's

max1020 H   // more complicated logic.


Authoring docs

Copyright Nick Parlante 2017 - privacy