Inspired by this

## What is an average character?

Say we have a string golf(). We then take the ASCII value of each separate symbol, so our string is 103 111 108 102 40 41, and calculate the average of those values, rounded to an integer. In our case the average is 505 / 6 = 84.1666... = rounded to 84. That value is printed out as an ASCII character, in our case T.

# Rules

You must take no input and must not read the source code directly, while outputting the average character of its source code. Integers are rounded by function floor(x+0.5). Empty programs are not allowed. This is code-golf, so lowest byte count wins!

• Average Character Calculator (only works for unicode characters input) Commented Jul 19, 2020 at 19:02
• While I like the idea, it would have been beneficial to restrict code to contain at least two different characters, neither of which can be identical to the average.
Commented Jul 19, 2020 at 19:07
• @Adám yeah, for some reason I didn't think of hardcoding the output... Maybe somebody could turn this into an interesting question, as I think its too late to edit this question.
– Dion
Commented Jul 19, 2020 at 19:10
• @Dion You could post in the Sandbox a variant where the scoring works best for longer programs, or where the average/sum plays some role (just spitballing ideas) Commented Jul 19, 2020 at 19:38
• @Dion Empty program would result the average value of round(0 / 0). It is invalid simply due to divided by zero. So I don't think the empty source code should be allowed. If it must be allowed, by using the definition of division, x / y = z is y * z = x, one may argue output any single character should be allowed.
– tsh
Commented Jul 20, 2020 at 6:25

# Grok, 4 bytes

I[Wq


Characters are 73 91 87 113. Average is 91, which is [.

# Vyxal, 1 byte

0


Try it Online!

Any digit works.

Or, if you think that doesn't count,

\\


Try it Online!

\ is a single-character string.

# Vyxal, 1 byte

7


Try it Online!

Somehow the average of this program turns out to be the luckiest number in universe

# Zsh, 5 bytes

<<< 5


Try it online!

# Gol><>, 3 bytes

TH

T   Escape the char T and push its charcode to stack
H  Print all values on the stack and halt


Found by making the template <any char>H and repeating the average calculator until it converges.

# Io, 8 bytes

I feel that this is too boring to find...

"Y"print


Try it online!

# ><>, 4 bytes

" o;


Try it online!

Outputs ; using a looping string literal.

# Pyth, 2 bytes

"!


ASCII value of " is 34, and ASCII value of ! is 33.

(33 + 34) / 2 = 33.5 = 33


Try it online!

# Keg, 1 byte

e


Try it online!

Haha. I'm not gonna be late to the party!

# Factor, 8 bytes

"Y"print


Try it online!

This actually works...................

# Ruby, 4 bytes


p 3


Try it online!

Adding a leading newline to lower the average from capital-letter land to digit land.

# Rexx (Regina), 5 bytes

SAY C


Try it online!

# MATLAB/Octave, 4 bytes

''''


Try it online!
Outputs single ' character. And basically it's the way to write that as an immidiate value - the outer apostrofes are to indicate the value is char array so we're left with '' which is escape code for a single apostrofe.

# Excel, 2 bytes

51


For once, there isn't some overly long Excel function to get in the way.

# Julia, 9 bytes

print(:W)


Try it online!

also works with

:d|>print Try it online!

# Thunno 2, 16 bytes

"DṘs+ĊmĊ"DṘs+ĊmĊ


Attempt This Online!

#### Explanation

"DṘs+ĊmĊ"DṘs+ĊmĊ  # Full program
"DṘs+ĊmĊ"         # String literal
DṘ       # Duplicate and push the representation
s+     # Prepend this to the original string
Ċ    # Convert to charcodes (using Thunno 2 encoding)
m   # Take the mean of this list
Ċ  # Convert it back to a character (using Thunno 2 encoding)



• 1 byte: 0 (or any other number)
• 2 bytes: ''` (a character literal)