Output the alphabet, the ALPHABET, or just a character
Pyth, 10 bytes
h/#z[GrG1z
Test suite
We start by constructing a list with 3 elements: the lowercase alphabet, the uppercase alphabet, and the input. ([GrG1z
) Then, we filter this list on the number of appearances of the input in the elements being nonzero. (/#z
) Finally, we take the first element of the filtered list.
TeaScript, 5 bytes
xN(0)
TeaScript has a (almost) built-in for this :D
Try it online (note: the online interpreter has been updated to TeaScript v3 so in which this is N0
)
Try all the test cases
TeaScript 3, 2 bytes [non-competing]
Using TeaScript 3, this can become 2-bytes. This is non-competing because TeaScript 3 was made after this challenge
N0
1 byte alternative
If we could output 0123456789
for digits, then this could be:
°
LabVIEW, 23 LabVIEW Primitives
The selector (the ? on the cse structure) is connected to a vi that is called Lexical Class. It ouputs numbers from 1-6 depending on input, 5 is lower case 4 is upper case.
The for loop goes 26 times to create an alphabet or once to pass the symbol through.