This challenge is different from "another cat program".
There's literal tons of different twists, why can't I have my own, people?
- 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.
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.
- UA, UB, UC with input words with uppercase first letters (if not uppercase already) (ex.
- FUA, FUB, FUC with respectively first uppercase letters: (ex.
- a/an with article respective to first letter vowel/consonant (ex.
[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]!
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!
- 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!