δ^hr¥áÅ;v^mÅ~§
I/O as a list of characters.
Try it online.
Explanation:
δ # Capitalize each character in the (implicit) input-list
# e.g. ['a','b','c','d','e'] → ['A','B','C','D','E']
^ # Zip it with the (implicit) input-list
# → [['a','A'],['b','B'],['c','C'],['d','D'],['e','E']]
h # Push the length (without popping)
# → 5
r # Pop and push a list in the range [0,length)
# → [0,1,2,3,4]
¥ # Mod-2 on each
# → [0,1,0,1,0]
á # Sort it by,
Å # using the following 2 characters as inner code-block:
; # Discard the value
v # Push a random integer in the range [-2147483648,2147483647]
# e.g. [0,1,0,0,1]
^ # Zip these shuffled 0s/1s with the earlier pair of characters
# → [[['a','A'],0],[['b','B'],1],[['c','C'],0],[['d','D'],0],[['e','E'],1]]
m # Map over each,
Å # using 2 characters as inner code-block again:
~ # Dump the pair and integer separated to the stack
§ # Index the integer into the pair
# → ['a','B','c','d','E']
# (after which the entire stack is output implicitly as result)