Slide 33
Slide 33 text
Prime
factorization
Split an integer into its
prime factors
Examples
4 ➔ 2,2
42 ➔ 2,3,7
String-Calculator
1. Sum the numbers in a
string
e.g.: „1,2,3“ ➔ 6
2. Delimiter may be comma
or newline
e.g.: „1,3\n5“ ➔ 9
3. Different delimiter can
be specified with a /
/ at
the beginning
e.g. „/
/;\n2;4;8“ ➔ 14
Text munger
Mutate every word,
so the first and last chars
stays the same and inner
chars are in reversed
order
Examples
Test
➔ Tset
I love you
➔ I lvoe you
Extreme Programming
rules!
➔ Emertxe Pnimmargorg
relus!
Freitag, 19. Oktober 12