R, versions 2 and 3, 21 bytesscore: 10.5 points
cat(exists("cite")+2)
This command returns 2
for R 2.x.x and 3
for R 3.x.x. The function cite
was added in R version 3.0.0. Therefore, the command exists("cite")
returns FALSE
for R 2.x.x and TRUE
for R 3.x.x.
R, all versions (1, 2, and 3), 37 bytesscore: 12⅓ points
e=exists;cat(e("cite")+e("eapply")+1)
The function eapply
was introduced in R 2.0.0.