[Question]
  [
If you like this, consider participating in:
* The [Official Dyalog APL 2016 Year Game](https://codegolf.stackexchange.com/q/70361/43319)
* The monthly [Dyalog APL 2017 Code Golf Challenge](http://www.dyalog.com/2017-code-golf-challenge.htm)
---
Make 12 **snippets/expressions**, in the same language, that result in the numbers 0 through 10, and 42 respectively, but without writing any literal numeric, string, or character data.
Build-in data, like `PI()` and `ALPHABET()`, are fine, and so are e.g. CJam's U, X, Y, Z, and A constants, and Processing's BLEND, CHORD, CENTER, BREAK, and LINES.
Every snippet must be able to stand on its own, i.e. they may not be interdependent. However, inside a single snippet, you may assign a variable and use it freely, as long as you refer to it directly by name, and not through a string containing its name.
All the snippets must be valid on the submitter’s computer at the time of submission (as reported by SE), but may not rely on unusual local conditions like number of files in a directory, the exact date or time, or specific input from the user.
### Examples of valid snippets
3: `INT(LOG10(YEAR(TODAY())))` because it remains true in the foreseeable future  
4: `CUBICROOT(LEN(CHARACTERSET()))` because a 256 letter character set is very common  
8: `SQRT(SYSTEMTYPE())` because 64-bit systems are very common
### Examples of invalid snippets
5: `LEN(USERNAME())` because most people do not use “Admin” as login :-)  
9: `LOG10(SYSTEMMEMORY())` because it only works on systems with exactly 1 GB of memory  
42: `CODE("*")` because it contains a string/character literal
The result of each snippet must result in an actual number (value, int, float, etc.) that can be used for further calculations using the same language as the snippet, i.e not a text string representing that number.
Only character based languages allowed. 
Score is total byte count of all the 12 snippets combined. Newlines separating the snippets are not counted in.
Note that the above rules may prevent some languages from participating, even if they are Turing complete.
### FAQ
**Q** Can the programs accept any input?  
**A** Yes, but you may not just ask for input and enter the relevant number.
**Q** Are physical digits (non-data) digits allowed?  
**A** Yes, e.g. `LOG10()`.
**Q** Do Symbols in Ruby count as literals?  
**A** Yes.
**Q** Does score include newlines between each snippet?  
**A** No.
**Q** Is TI-BASIC "character based" enough to be valid?  
**A** Yes.
**Q** Do false and true count as number literals?  
**A** No, they are acceptable.
**Q** Can we use a number literal to call a function if that's the only way and the number doesn't influence the output of the function?  
**A** Yes, if that is the normal way to write code in your language.
**Q** My language assumes there is a [something] at the start of each program/expression. Must I include it, or should my snippets just work if placed in the middle of a program/expression?  
**A** They should just work in the middle of a program/expression.
**Q** What about regex literals?  
**A** Forbidden, except for languages that only do regexes.
**Q** Is one piece of code that could print all the specified numbers acceptable?  
**A** No, they have to be separate and mutually independent.
**Q** May I assume a boilerplate like `int main() {}...` or equivalent?  
**A** Yes.
**Q** What output datatypes are allowed?  
**A** Any numeric datatype, like int, float, etc.
**Q** Do I need to print the result of each snippet?  
**A** No, making the result available for subsequent use is enough.
**Q** Are pre-set variables allowed?  
**A** Yes, and they become reset (if changed) for every snippet.
**Q** Are π and *e* considered number literals?  
**A** No, you may use them.
**Q** May I return 4 and 2 in different cells for 42?  
**A** No, they must be connected as one number.
**Q** Bytes or characters?  
**A** Bytes, but you may choose any desired codepage.
**Q** May constant functions and preset variables like J's `9:`, Actually's `9`, and Pretzel's `9` be used?  
**A** Yes, if the vocabulary is finite (19 for J, 10 for Actually and Pretzel).
  
[Answer]
# [Funciton](http://esolangs.org/wiki/Funciton), 1222 bytes
Apart from numeric literals, there are two ways I can produce a value (any value at all) in Funciton: stdin and lambda expressions. Stdin is a single box while a full lambda expression requires more syntax, so I’m going with stdin. However, while stdin could be anything, all of the following work regardless of what input is provided.
All of the library functions used here existed before the challenge was posted.
## 0 (40 bytes in UTF-16)
```
╔╗┌┐
║╟┤└┼┬┐
╚╝└─┘└┘
```
This uses the raw syntax for less-than. A value is never less than itself, so the result of this is 0.
## 1 (52 bytes in UTF-16)
```
╔╗┌─╖┌─╖
║╟┤⌑╟┤ɕ╟
╚╝╘═╝╘═╝
```
`⌑` returns a lazy sequence containing a single element and `ɕ` counts the number of elements. (The lazy sequence is lazy enough that this snippet doesn’t actually evaluate stdin at all!)
## 2 (70 bytes in UTF-16)
```
╔╗┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ɕ╟
╚╝╘═╝╘═╝╘═╝
```
= 2¹. `ʂ` generates all subsequences of a sequence, and thus turns a sequence of *n* elements into one with 2ⁿ.
## 3 (88 bytes in UTF-16)
```
╔╗┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ɕ╟┤♯╟
╚╝╘═╝╘═╝╘═╝╘═╝
```
= 2 + 1. `♯` increments a value by 1.
## 4 (88 bytes in UTF-16)
```
╔╗┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ʂ╟┤ɕ╟
╚╝╘═╝╘═╝╘═╝╘═╝
```
= 2².
## 5 (106 bytes in UTF-16)
```
╔╗┌─╖┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ʂ╟┤ɕ╟┤♯╟
╚╝╘═╝╘═╝╘═╝╘═╝╘═╝
```
= 4 + 1.
## 6 (106 bytes in UTF-16)
```
╔╗┌─╖┌─╖┌─╖┌─╖┌─╖
║╟┤⌑╟┤ʂ╟┤ɕ╟┤♯╟┤!╟
╚╝╘═╝╘═╝╘═╝╘═╝╘═╝
```
= 3 factorial.
## 7 (110 bytes in UTF-16)
```
┌───┐┌─╖┌─╖┌─╖╔╗
│┌─╖├┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤A╟┘╘═╝╘═╝╘═╝╚╝
 ╘╤╝
```
= A(2, 2) (Ackermann function).
## 8 (118 bytes in UTF-16)
```
┌────┐┌─╖┌─╖┌─╖╔╗
│┌──╖├┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤<<╟┘╘═╝╘═╝╘═╝╚╝
 ╘╤═╝
```
= 2 << 2 (shift-left).
## 9 (128 bytes in UTF-16)
```
┌───┐┌─╖┌─╖┌─╖┌─╖╔╗
│┌─╖├┤♯╟┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤×╟┘╘═╝╘═╝╘═╝╘═╝╚╝
 ╘╤╝
```
= 3 × 3.
## 10 (146 bytes in UTF-16)
```
┌───┐┌─╖┌─╖┌─╖┌─╖┌─╖╔╗
│┌─╖├┤♯╟┤ɕ╟┤ʂ╟┤ʂ╟┤⌑╟╢║
└┤+╟┘╘═╝╘═╝╘═╝╘═╝╘═╝╚╝
 ╘╤╝
```
= 5 + 5.
## 42 (170 bytes in UTF-16)
```
┌──────┐┌─╖┌─╖┌─╖┌─╖┌─╖╔╗
│┌─╖┌─╖├┤!╟┤♯╟┤ɕ╟┤ʂ╟┤⌑╟╢║
└┤♯╟┤×╟┘╘═╝╘═╝╘═╝╘═╝╘═╝╚╝
 ╘═╝╘╤╝
```
= 6 × (6 + 1).
[Answer]
# JavaScript, ~~144~~ ~~141~~ ~~140~~ ~~138~~ ~~132~~ ~~125~~ 123 bytes
*With help from [@edc65](https://codegolf.stackexchange.com/users/21348/edc65), [@Sjoerd Job Postmus](https://codegolf.stackexchange.com/users/46690/sjoerd-job-postmus), [@DocMax](https://codegolf.stackexchange.com/users/1772/docmax), [@usandfriends](https://codegolf.stackexchange.com/users/39042/usandfriends), [@Charlie Wynn](https://codegolf.stackexchange.com/users/50053/charlie-wynn) and [@Mwr247](https://codegolf.stackexchange.com/users/30793/mwr247)!*
```
result.textContent = [
+[]                          ,// 0  (3 bytes)
-~[]                         ,// 1  (4 bytes)
-~-~[]                       ,// 2  (6 bytes)
-~-~-~[]                     ,// 3  (8 bytes)
-~Math.PI                    ,// 4  (9 bytes)
-~-~Math.PI                  ,// 5  (11 bytes)
-~-~-~Math.PI                ,// 6  (13 bytes)
Date.length                  ,// 7  (11 bytes)
(a=-~-~[])<<a                ,// 8  (13 bytes) = (2 << 2)
(a=~Math.E)*a                ,// 9  (13 bytes) = (-3 * -3)
(a=-~-~[])<<a|a              ,// 10 (15 bytes) = ((2 << 2) | 2)
(a=Date.length)*--a           // 42 (19 bytes) = (7 * 6)
];
```
```
<pre id="result"></pre>
```
[Answer]
# [Hexagony](http://github.com/mbuettner/hexagony), 13 bytes
```
1
2
3
4
5
6
7
8
9
10
42
```
[Try it online!](http://hexagony.tryitonline.net/)
In Hexagony, `0` through `9` are **functions** that multiply the current memory by 10, and then add the number represented by the function name. Therefore, the first snippet is empty as memories start off as `0`.
For example, if the current memory is `65`, executing the function `3` will make the current memory `653`.
(To downvoters: downvote all you want; I am ready.)
[Answer]
# [Mouse-2002](https://github.com/catb0t/mouse2002), ~~27~~ ~~26~~ ~~17~~ 14 bytes
The first snippets push 0-10, and `ZR+` pushes `25` then `17` and `25 17 + 42 =` is `1`.
```
A
B
C
D
E
F
G
H
I
J
K
ZR+
```
[Answer]
# CJam, ~~27~~ 24 bytes
```
U    e# 0
X    e# 1
Y    e# 2
Z    e# 3
Z)   e# 3 + 1
YZ+  e# 2 + 3
ZZ+  e# 3 + 3
AZ-  e# 10 - 3
YZ#  e# 2³
A(   e# 10 - 1
A    e# 10
EZ*  e# 14 × 3
```
*Thanks to @MartinBüttner for -1 byte!*
[Try it online!](http://cjam.tryitonline.net/#code=VSBYIFkgWiBaKSBZWisgWlorIEFaLSBZWiMgQSggQSBFWioKCl1gIGUjIFByaW50IGFzIGxpc3QuCg&input=)
[Answer]
# Brainfuck, 70 bytes
```
+
++
+++
++++
+++++
++++++
+++++++
++++++++
+++++++++
++++++++++
--[>+<++++++]>-
```
Each line must be run individually.
The first 10 are self explanatory: we increment the value of the cell via each plus.
The 42 is a lot more complex. It relies on the fact the most brainfuck interpreter use 8-bit cells, meaning that all operations on it are done modulo 256. The `--` sets cell #0 to 254. Then we enter a loop which runs until cell #0 is 0. Each iteration adds 1 to cell #1 and adds 6 to cell #0. This loops runs 43 times, so cell #1 is 43. Finally, we subtract 1 from cell #1 to make it 42.
I got the most efficient 42 ever found from <http://esolangs.org/wiki/Brainfuck_constants>
[Answer]
## [Darkness](https://github.com/sweerpotato/Darkness), 339 303 bytes
This is where Darkness really *shines*. Get it? :~)!
**Without printing** (replaced the space with `\s` in the first line since it won't show otherwise):
```
\s
█ 
██ 
███ 
████ 
█████ 
██████ 
███████ 
████████ 
█████████ 
██████████ 
██████████████████████████████████████████ 
```
**With printing:**
```
■ 
█■ 
██■ 
███■ 
████■ 
█████■ 
██████■ 
███████■ 
████████■ 
█████████■ 
██████████■ 
██████████████████████████████████████████■ 
```
Each line must be run individually in this case since the program terminates in the light (a space). However, it is possible to write this on one or several lines in the same program.
Regular darkness (█) increments a register by 1, and the ■ instruction (some sort of mini-darkness) outputs the contents of the register.
[Answer]
## Perl 5, ~~86~~ ~~75~~ ~~71~~ 66 bytes
All `^F`s are literal control characters (0x06 in ASCII), and hence a single byte.
```
$[          # array start index, defaults to 0                                  2
!$[         # !0 is 1                                                           3
$^F         # max sys file descriptor number, 2 on all sane systems             2
++$^F       # 2 + 1                                                             4
~-$]        # 5 - 1                                                             4
int$]       # $] is Perl version, int truncates                                 5
length$~    # 1 + 5                                                             8
~~exp$^F    # floor(e^2)                                                        7
$^F<<$^F    # 2 bitshift-right 2                                                6
-!$[+ord$/  # -1 + 10                                                          10
ord$/       # input record separator, newline by default, ord gets ASCII val    5
ord($"^$/)  # 32 + 10                                                          10
```
Thanks to [msh210](https://codegolf.stackexchange.com/users/1976/msh210) for saving 11 bytes and [Dom Hastings](https://codegolf.stackexchange.com/users/9365/dom-hastings) for 9 bytes!
[Answer]
## MATL, 30 bytes
```
O
l
H
I
K
Kl+
HI*
KYq
HK*
IH^
K:s
IH^:sI-
```
`H`, `I`, and `K` are predefined constants for 2, 3, and 4 (like `pi`). `O` and `l` are functions that returns a matrix of zeros (`O`) or ones (`l`), the default size is 1x1. `:` makes a vector, and `s` sums it, so `K:s` makes a vector from 1 to 4 and sums it to get 10. `Yq` is the n-th prime function, so `KYq` is the 4th prime, 7.
[Answer]
# Prolog, ~~113~~ 99 bytes
**Snippets:**
```
e-e              % 0.0
e/e              % 1.0
e/e+e/e          % 2.0
ceil(e)          % 3
ceil(pi)         % 4
ceil(e*e-e)      % 5
ceil(e+e)        % 6
floor(e*e)       % 7
ceil(e*e)        % 8
ceil(pi*e)       % 9
ceil(pi*pi)      % 10
ceil(e^e*e)      % 42
```
Combines the mathematical constants **e** and **pi** in different ways converted to int.
**Edit:** Saved 14 bytes by utilizing floats for 0-2.
[Answer]
# PHP, ~~157~~ ~~145~~ 91 bytes
First time posting on Code Golf, figured I'd give it a shot. I'll get better eventually :P If you see any obvious (to you) spots where I could save characters, let me know.
EDIT: Realized I didn't need the semicolons, since these are just snippets.
EDIT2: Thanks to Blackhole for many suggestions!
```
LC_ALL
DNS_A
~~M_E
~~M_PI
LOCK_NB 
LC_TIME
LOG_INFO
INI_ALL
IMG_WBMP
SQL_DATE
SQL_TIME
LOG_INFO*INI_ALL
```
[Answer]
# Python 2, ~~191~~ ~~159~~ ~~158~~ ~~157~~ ~~156~~ ~~149~~ 146 bytes
My first submission ever, I hope I got everything right !
Based on the time I spent on this, I guess there's surely a better one for a few of them.
```
# 0 | Bytes : 5
int()
# 1 | Bytes : 5
+True
# 2 | Bytes : 6
-~True
# 3 | Bytes : 8
-~-~True
# 4 | Bytes : 10
-~-~-~True
# 5 | Bytes : 12
-~-~-~-~True
# 6 | Bytes : 14
-~-~-~-~-~True
# 7 | Bytes : 16
-~-~-~-~-~-~True
# 8 | Bytes : 15
a=True;a<<a+a+a
# 9 | Bytes : 19
a=True;(a<<a+a+a)+a
# 10 | Bytes : 20
int(`+True`+`int()`)
# 42 | Bytes : 16
~-len(`license`)
# Especially proud of this one !
Total byte count: 146
```
Many thanks to FryAmTheEggman !
[Answer]
# C#, no usings, 234 bytes
```
new int()                       // 0
-~new int()                     // 1
-~-~new int()                   // 2
-~-~-~new int()                 // 3
-~-~-~-~new int()               // 4
-~-~-~-~-~new int()             // 5
-~-~-~-~-~-~new int()           // 6
-~-~-~-~-~-~-~new int()         // 7
-~-~-~-~-~-~-~-~new int()       // 8
(int)System.ConsoleKey.Tab      // 9
(int)System.TypeCode.UInt32     // 10
(int)System.ConsoleKey.Print    // 42
```
This is much more boring than I initially thought it was going to be. I had pretty varied ideas, such as `new[]{true}.Length` and `true.GetHashCode()` and `typeof(int).Name.Length` and `uint.MinValue` etc., but `new int()` beat them all.
[Answer]
# PowerShell, 147 bytes
These use `+` to implicitly cast things to integers. The later numbers use Enums from the .Net Framework unerpinnings of PowerShell which happen to have the right values.
```
+$a                          #0, 3 bytes (unset vars are $null, +$null == 0)
+$?                          #1, 3 bytes (bool previous result, default $true, +$true == 1)
$?+$?                        #2, 5 bytes (same as #1, twice)
$?+$?+$?                     #3, 8 bytes (beats [Int][Math]::E)
$?+$?-shl$?                  #4, 11 bytes (-shl is shift-left)
$?+$?+$?+$?+$?               #5, 14 bytes
$?+$?+$?-shl$?               #6, 14 bytes (enum value, + casts to integer)
+[TypeCode]::Int16           #7, 18 bytes
$?+$?-shl$?+$?               #8, 14 bytes
+[consolekey]::tab           #9, 18 bytes
+[TypeCode]::UInt32          #10, 19 bytes
+[consolekey]::Print         #42, 20 bytes
#Total:                      147 bytes
```
---
* `-~-~-~` used in JavaScript, C# and PHP answers would be `- -bnot - -bnot - -bnot` in PowerShell.
* `x^y` exponentiation used in Perl answers, or `x**y` in Python or JavaScript ES7, would be `[Math]::Pow($x,$y)`
* constants *e* and *Pi* are the character-heavy `[Math]::E` and `[Math]::PI`
[Answer]
# [DC](https://rosettacode.org/wiki/Category:Dc), 35 bytes
```
K
KZ
IZ
Iv
EI-
FI-
IZd*
IIZ/
Ivd+
IIv-
IIZ-
IKZ-
I
EdE++
```
To test the snippets append a `f` to print the stack and pass that string to `dc`:
```
$ echo 'EdE++f' | dc
42
```
[Answer]
## TI-BASIC, 41 bytes
0~10:
```
X
cosh(X
int(e
int(π
-int(-π
int(√(π³
int(π+π
int(e²
int(eπ
int(π²
Xmax
```
42:
```
int(π²/ecosh(π
```
In TI-BASIC, all uninitialized single-letter variables start at 0, and `Xmax` (the right window boundary of the graph screen) starts at 10.
The mathematical constant `π` is [one byte](http://tibasicdev.wikidot.com/one-byte-tokens), but `e` is two bytes.
[Answer]
# Python 2, ~~306~~ ~~275~~ 274 bytes
I used the fact that for any *x* (integer and not 0) the expression `x/x` equals 1 and played around with some bitwise operations.
I adjusted the snippets such that they still meet the requirements (thanks @nimi this saved me 24 bytes), but you have to manually test them. Here is the code and individual byte counts:
```
zero.py Bytes: 7
len({})
--------------------------
one.py  Bytes: 12
r=id(id)
r/r
--------------------------
two.py  Bytes: 17
r=id(id)
-(~r/r)
--------------------------
three.py    Bytes: 20
r=id(id)
-(~r/r)|r/r
--------------------------
four.py Bytes: 20
r=~id(id)/id(id)
r*r
--------------------------
five.py Bytes: 26
r=~id(id)/id(id)
(r*r)|r/r
--------------------------
six.py  Bytes: 25
r=~id(id)/id(id)
(r*r)|-r
--------------------------
seven.py    Bytes: 27
r=~id(id)/id(id)
-~(r*r|-r)
--------------------------
eight.py    Bytes: 24
r=-(~id(id)/id(id))
r<<r
--------------------------
nine.py Bytes: 29
r=-(~id(id)/id(id))
r-~(r<<r)
--------------------------
ten.py  Bytes: 31
r=~id(id)/id(id)
-r*((r*r)|r/r)
--------------------------
answer.py   Bytes: 37
r=-(~id(id)/id(id))
(r<<r*r)|(r<<r)|r
--------------------------
Total byte count: 274
```
[Answer]
## Javascript (Browser Env), ~~155~~ ~~136~~ 130 bytes
```
+[]
-~[]
-~-~[]
-~-~-~[]
-~-~-~-~[]
-~-~-~-~-~[]
-~-~-~[]<<-~[]
-~-~-~-~-~-~-~[]
-~[]<<-~-~-~[]
~(~[]+[]+-[])
-~[]+[]+-[]
-~(top+top.s).length // Requires browser environment
```
*Thanks to:   
[@Ismael Miguel](https://codegolf.stackexchange.com/users/14732/ismael-miguel): 155 -> 136 -> 130 bytes*
[Answer]
## Seriously, ~~39~~ 33 bytes
Stuff in parentheses is explanations:
```
 (single space, pushes size of stack, which is 0 at program start)
 u (space pushes 0, u adds 1 (1))
 ⌐ (space pushes 0, ⌐ adds 2 (2))
 u⌐ (space pushes 0, u adds 1 (1), ⌐ adds 2 (3))
 ⌐⌐ (space pushes 0, ⌐⌐ adds 2 twice (4))
 ⌐P (space pushes 0, ⌐ adds 2 (2), P pushes the 2nd prime (5))
Hl▓ (H pushes "Hello, World!", l pushes length (13), ▓ pushes pi(13) (6))
QlP (Q pushes "QlP", l pushes length (3), P pushes the 3rd prime (7))
Ql╙ (Q pushes "QlP", l pushes length (3), ╙ pushes 2**3 (8))
úl▓ (ú pushes the lowercase English alphabet, l pushes length (26), ▓ pushes pi(26) (9))
 u╤ (space pushes 0, u adds 1 (1), ╤ pushes 10**1 (10))
HlPD (H pushes "Hello, World!", l pushes length (13), P pushes the 13th prime (43), D subtracts 1 (42))
```
Hexdumps of programs:
```
20
2075
20a9
2075a9
20a9a9
20a950
486cb2
516c50
516cd3
a36cb2
2075d1
486c5044
```
Thanks to quintopia for 6 bytes!
[Answer]
# dc, 42 bytes
```
K
zz
OZ
zzz+
OZd*
OdZ/
zzzz*
Ozz+-
OdZ-
Oz-
O
Od+dz++
```
## Results
```
0
1
2
3
4
5
6
7
8
9
10
42
```
There aren't many ways to generate new numbers with dc. I use `O`: output base, initially 10; `K`: precision, initially 0; `z` stack depth, initially 0; `Z` significant digits of operand. We combine these with the usual arithmetic operators.
# Test program
```
#!/bin/bash
progs=(                                         \
    "K"                                         \
    "zz"                                        \
    "OZ"                                        \
    "zzz+"                                      \
    "OZd*"                                      \
    "OdZ/"                                      \
    "zzzz*"                                     \
    "Ozz+-"                                     \
    "OdZ-"                                      \
    "Oz-"                                       \
    "O"                                         \
    "Od+dz++"                                   \
)
a=0
results=()
for i in "${progs[@]}"
do
    results+=($(dc -e "${i}p"))
    (( a+=${#i} ))
done
echo "#dc, $a bytes"
echo
printf '    %s\n' "${progs[@]}"
echo
echo '##Results'
echo
printf '    %s\n' "${results[@]}"
```
[Answer]
# Math++, 92 bytes total
0 (1 bytes): `a`
1 (2 bytes):`!a`
2 (3 bytes):`_$e`
3 (4 bytes): `_$pi`
4 (7 bytes): `_$e+_$e`
5 (8 bytes): `_($e+$e)`
6 (9 bytes): `_$pi+_$pi`
7 (8 bytes): `_($e*$e)`
8 (9 bytes): `_($e*$pi)`
9 (10 bytes): `_($pi*$pi)`
10 (12 bytes): `_$e*_($e+$e)`
42 (19 bytes): `_($pi+$pi)*_($e*$e)`
[Answer]
# MS Excel formulas, ~~163~~ ~~151~~ ~~150~~ 143 bytes
Not exactly a programming language, but here it goes...
```
0:  -Z9                         (03 bytes)
1:  N(TRUE)                     (07 bytes)
2:  TYPE(T(Z9))                 (11 bytes)
3:  TRUNC(PI())                 (11 bytes)
4:  TYPE(TRUE)                  (10 bytes)
5:  ODD(PI())                   (09 bytes)
6:  FACT(PI())                  (10 bytes)
7:  ODD(PI()+PI())              (14 bytes)
8:  EVEN(PI()+PI())             (15 bytes)
9:  TRUNC(PI()*PI())            (16 bytes)
10: EVEN(PI()*PI())             (15 bytes)
42: EVEN(CODE(-PI())-PI())      (22 bytes)
```
`PI()` is used in most cases as it is the shorter way (that I am aware of) to introduce a numeric value without using a number or string literal. `N` converts various things (incl. booleans) to numbers, and `T` converts various things to text. `TYPE` returns 2 for a text argument and 4 for a boolean argument. `TRUNC` discards fractional part (i.e. rounds positive numbers down), `EVEN` rounds up to the next even number, and `ODD` rounds up to the next odd number. `CODE(-PI())` is the ASCII code of the first character of the conversion to text of -π, i.e. 45 (for "-").
EDIT: Removed equal signs from the byte count (-12!) - as pointed out by Nᴮᶻ in the comments, they are not supposed to be included.
EDIT 2: Assuming the rest of the worksheet is empty, it is possible to use a reference to an empty cell as zero (again, suggested by Nᴮᶻ) provided that we include a minus sign (or use it in other numeric expression) to resolve type ambiguity.
[Answer]
## Mathematica, 101 bytes
```
a-a
a/a
⌊E⌋
⌈E⌉
⌈π⌉
⌊E+E⌋
⌈E+E⌉
⌊E*E⌋
⌈E*E⌉
⌈E*π⌉
⌈π*π⌉
⌊π*π^π/E⌋
```
I'm pretty sure some of these are suboptimal. Those rounding brackets are really expensive.
For consistency, the first two could also be `E-E` and `E/E` of course, but I thought it's quite nifty to get `0` and `1` from a computation with undefined variables. 
[Answer]
# [Japt](http://ethproductions.github.io/japt/), ~~34~~ ~~33~~ 30 bytes
*1 byte saved thanks to @ThomasKwa*
```
T
°T
C-A
D-A
E-A
F-A
G-A
°G-A
Iq
´A
A
H+A
```
Here's what each of the different chars means:
```
T    0
A    10
B    11
C    12
D    13
E    14
F    15
G    16
H    32
I    64
q    sqrt on numbers
°    ++
´    --
```
[Answer]
# [Marbelous](https://github.com/marbelous-lang/docs/blob/master/spec-draft.md), 98 bytes
Not terribly exciting, it relies on the `?n` devices which turn any marble into a random value in the range 0..n (inclusive) a side effect of this is that `?0` turns any marble into a 0 regardless of input. I think the use of literals is permitted because the value does not affect the outcome and there is no other way to call a function once in Marbelous.
0:
```
00  # A hexadicemal literal: value 0
?0  # Turn any marble into a random value from the range 0..0 (inclusive)
```
1:
```
00
?0
+1  # increment by one
```
...
9:
```
00
?0
+9
```
10:
```
00
?0
+A  # increment by 10
```
42:
```
00
?0
+L  # increment by 21
+L
```
[Answer]
## [><>](https://esolangs.org/wiki/Fish), 86 bytes
* 0: `ln;`
* 1: `lln;`
* 2: `llln;`
* 3: `lll+n;`
* 4: `lll:+n;`
* 5: `llll+n;`
* 6: `llll++n;` or `llll:+n;`
* 7: `lllll+n;`
* 8: `lllll:+n;`
* 9: `lllll++n;` or `llllll+n;`
* 10: `llll+:+n;` or `lll:l+*n;`
* 42: `llll*ll+*n;`
Relies on stack size to get its literals.
[Answer]
## Dyalog APL, ~~59~~ 52 bytes
*-7 bytes by @NBZ*
I wasn't about to let one of @NBZ's questions go without an APL answer!
```
⍴⍬            0
⎕IO           1
⍴⎕SD          2
⎕WX           3
⍴⎕AI          4
⌈⍟⎕PW         5
⌊⍟⎕FR         6
⍴⎕TS          7
+⍨⍴⎕AI        8
⌊○○⎕IO        9; floor(pi^2 times ⎕IO)
⍴⎕D           10
⍎⌽⍕⌈*○≢#    42
```
In the last snippet, by NBZ, `≢#` equals 1. ceil(e^(pi\*1)) is calculated as 24, whose digits are then swapped.
Constants used:
* `⍬`, is the empty numeric one-dimensional vector. Therefore, its shape `⍴⍬` is 0.
* `#` is a special vector of length 1.
* `⎕IO` (index origin) starts at 1.
* `⎕AV`, the character set, is of length 256.
* `⎕PW`, the print width, is 79 characters.
* `⎕WX`, window expose (whatever that is) is 3.
* `⎕FR`, the float representation, is 645. I have no idea what this is either.
* `⎕D`, "digits", is '0123456789'.
* `⎕TS`, timestamp, has seven elements: Year, month, day, hr, min, sec, ms.
* `⎕SD`, screen dimensions, has two elements: width and height.
* `⎕AI`, account info, has four elements. I don't know what they are.
[Answer]
# [DUP](https://esolangs.org/wiki/DUP), 68 bytes
```
[
 [
  [
[)]!
[ )]!
[  )]!
[)~_]!
[ )~_]!
[  )~_]!
[   )~_]!
[)$+]!
[ )$+~_$+]!
```
`[Try it here.](http://www.quirkster.com/iano/js/dup.html)`
There are a LOT of ways to do this, but I'm abusing the return stack for this one.
# Explanation
To fully figure this out, you need to understand DUP's behavior regarding lambdas. Instead of pushing the lambda itself to the stack, it actually pushes the current IP to the stack when the lambda is detected. That can explain the first 3 snippets, which involve lambdas.
The next snippets use the return stack. When `!` is executed, the current IP is pushed to the return stack, and the top of the stack is set as the new IP to start lambda execution. `)` pops a number from the return stack onto the data stack.
That's pretty much enough to explain the rest of the snippets. If you still don't get it, keep in mind that the `Step` button is quite handy!
[Answer]
# 05AB1E, ~~40~~ ~~38~~ 24 bytes
```
¾
X
Y
XÌ
Y·
T;
T;>
T;Ì
TÍ
T<
T
žwT+
```
* Push counter\_variable
* Push 1
* Push 2
* Push 1+2
* Push 2\*2
* Push 10/2
* Push (10/2)+1
* Push (10/2)+2
* Push 10-2
* Push 10-1
* Push 10
* Push 32, 10, add
[Answer]
## Pyth, ~~35~~ ~~34~~ 33 bytes
*-1 byte by @Mimarik*
There are a number of possibilities for some programs.
**0, 1 byte**
```
Z
```
**1, 2 bytes**
```
hZ
!Z
```
**2, 3 bytes**
```
hhZ
eCG
eCd
lyd
lyb
lyN
```
**3, 3 bytes**
```
l`d
```
**4, 3 bytes**
```
l`b
eCN
```
**5, 4 bytes**
```
hl`b
telG
```
**6, 3 bytes**
```
elG
```
**7, 4 bytes**
```
tttT
helG
```
**8, 3 bytes**
```
ttT
```
**9, 2 bytes**
```
tT
```
**10, 1 byte**
```
T
```
**42, 4 bytes**
```
yhyT
```
All of these involve either basic double (`y`), +1 (`h`) and -1 (`t`) commands, or `l` (length of a string). The Z variable is initialized to zero.
For 5, `b` is initialized to a newline character. Backtick gives `"\n"` (including the quotes, and the length of that string is 4.
Try them [here](https://pyth.herokuapp.com/?code=Z%0AhZ%0AhhZ%0Al%60d%0Al%60b%0Ahl%60b%0AelG%0AtttT%0AttT%0AtT%0AT%0AyhyT&debug=0)!
]