Prelude:
This challenge is different from "another cat program".
There's literal tons of different twists, why can't I have my own, people?
Unique things:
- It isn't reading direct input to output.
- It is manipulating the string in a way that for sure isn't a straight-up cat.
Challenge:
Given 3 inputs (or one input, separated however you like) get three objects (words) that we're going to substitute for pens, pineapples and apples in the lyrics and output.
Output format (according to lyrics found on AZLyrics):
Assuming (replace values with brackets with these):
- A, B, C with input words (ex.
apple
) - UA, UB, UC with input words with uppercase first letters (if not uppercase already) (ex.
Apple
) - FUA, FUB, FUC with respectively first uppercase letters: (ex.
A
) - a/an with article respective to first letter vowel/consonant (ex.
an
)
[FUA]-[FUB]-[FUC]-[FUA] I have [a/an] [A], I have [a/an] [C]. Uh! [UC]-[UA]! I have [a/an] [A], I have [a/an] [B]. Uh! [UB]-[UA]! [UC]-[UA], [UB]-[UA]. Uh! [UA]-[UB]-[UC]-[UA]. [UA]-[UB]-[UC]-[UA]!
Test case:
Test with pen
, pineapple
and apple
:
P-P-A-P
I have a pen, I have an apple.
Uh! Apple-Pen!
I have a pen, I have a pineapple.
Uh! Pineapple-Pen!
Apple-Pen, Pineapple-Pen.
Uh! Pen-Pineapple-Apple-Pen.
Pen-Pineapple-Apple-Pen!
Rules:
- If input doesn't start with a letter, assume consonant (
a
) and first uppercase the first character (ex.123 -> 1
). - code-golf, lowest amount of characters wins!