Avoid repeating letters between five simple programs
CJam, 73 bytes
"Obkkh+'Phukc&"7f^
q~m!
ri){'j3+_3++~},:+
lS-el_&
4{_' *4@-Y*('**+}%_1>W%\+N*
Each line is a full program. Try them online: 1 | 2 | 3 | 4 | 5
Letter map
bc f h k op u 18
m q 4
ij r 17
e l s 7
n w y 27
If you want (and each of your programs fits in a line), you can use this CJam program to create a letter map for your own submission.
Pyth, 90 bytes
First attempt...
Task 1: 20 bytes
+"Hello, "+C87"orld!
Task 2, 3 bytes
.!Q
Task 3, 9 bytes
sf}TPTSvz
Task 4, 6+8=14 bytes
@G{rw0
Task 5, 44 bytes
" *
***
*****
*******
*****
***
*
osascript, 759 Bytes
I knew this was going to be a lot when I started. o-o
Task 1: 15 Bytes
"Hello, World!"
I knew that it was going to be bad from this point.
Task 2: 64 + 8*4 = 96 Bytes
on run a set o to 1 repeat a set o to a*o set a to a-1 end o end
Oh gawd.
Task 3: 170 + 8*13 = 274 Bytes
on run a set o to 0 set t to false repeat with i from 2 to a set t to true repeat with c from 2 to i-1 if i mod c=0 then set t to false end if t then set o to o+i end end
Dennis ≠ outgolfed.
Task 4: 225 + 8*13 = 329
on run a set o to"" repeat with i in items of a repeat with c in characters of i if c is not in o then if ASCII number of c<91 then set o to o&(ASCII character of(ASCII number of c+32)) else set o to o&c end end end end o end
...
Task 5: 45 Bytes
" * *** ***** ******* ***** *** *"
So, yeah. I knew I was gonna lose from the start. But it was interesting, I'd be interested to know if there's a way to do this in fewer characters. Character map (as provided by Dennis):
de h l o r w 15 a cdef hi lmnop rstu w 160 a de nop rstu 57 abcdef hi lmnop rstu w 214 39 0
The character count above is slightly off - newlines made it have issues, as the newlines were uncounted.
NOTE: The reason for not using stuff like a's characters
or the like is that the '
character has to be used when executing from the osascript command line. If I had used '
, I'd have to use \'
or something similar, which wouldn't have helped me at all. Also, it only recognizes "
as string capturers, so I was kinda screwed there as well. But that was fun.