Share your repls and programming experiences

← Back to all posts
I made a code that guesses your age!
AH3973 (39)

You might know the trick to figure out someone's age already. This code is not just a lot of bologna because your final number will contain the number you initially chose.

awesome10 (234)



ok maybe i overdid that
WarriorDefender (3)

@awesome10 I was laughing my ass off LOL

WarriorDefender (3)

@DynamicSquid r u on discord? send me a frnd request to TheOriginalDude#0585

firefish (1004)

@DynamicSquid Apparently I haven't even been born yet:

Pretty much what I'd expect, being a firefish.

ShivankChhaya (236)

This is awesome! It guessed my age correctly!

ShivankChhaya (236)

@ZDev1 Seriously what do you mean?

zplusfour (890)

@ShivankChhaya yay!
How many trophies you have?

zplusfour (890)

@ShivankChhaya oh too low
i am 10,563!
( ͡° ͜ʖ ͡°)

ShivankChhaya (236)

@ZDev1 nice! I started a couple months ago but I dont play that much.

zplusfour (890)

@ShivankChhaya oh really?
I had one year ago!

ShivankChhaya (236)

@ZDev1 Wanna make a mutiplayer repl thats like brawl stars, but text based?

ShivankChhaya (236)

@kbadrinath_tcsp so you mean you'll make it also? i dont get it.

kbadrinath_tcsp (222)

I mean i'll help also its me keshav @ShivankChhaya

zplusfour (890)

@ShivankChhaya ok! why not
By the way, I have all the legenedries!

FlaminHotValdez (440)

So you are 4029 years old. I think you mean BC not AD...


@maxyang BC and AD are the same <:-|

SixBeeps (5062)

@voxico i can't tell if you're joking or not


@SixBeeps no lol I was joking

firefish (1004)

@voxico BC = Before Christ AD = Anno Domini


@johnstev111 Annon Domini = Year of the Christ

sudevr (2)

Did you just make some bologna until the 'enter your year of birth' and 'did your birthday pass this year' questions

AH3973 (39)

@sudevr no, this trick is supposed to performed at like a magic show or something. it is hard to do when it isn't live.

AH3973 (39)

The good thing about people chatting on my post is that now it is trending.

FrasherLGray (2)

If I give it my birth date, of course it would know my age, clever formula or no.

AH3973 (39)

@FrasherLGray this trick works better when like a magician is doing it live,

DynamicSquid (4634)

@AH3973 oh yeah, i've seen those before

Nettakrim (683)

are you on windows or mac?

DJWang (1345)

@Nettakrim I'm on mac. I honestly don't know why they could ask such a hard question. 4*2 is impossible!

Nettakrim (683)

@DJWang to answer this question we need to look at the history of mathematics

maths was invented in 2017 with the song "Mans not hot" by Big Shaq wherein he says "2 plus 2 is 4 minus 1 thats 3 quick maths"

this set the groundwork for the Axiom of Infinity which states if there is a set I (the set which is postulated to be infinite), such that the empty set is in I, and such that whenever any x is a member of I, the set formed by taking the union of x with its singleton {x} is also a member of I.

as you can see in the song, 2+2=4 so 4*2 can essentially be seen as (2+2)*2, in (2+2)*2 there are 3 twos and as further established in the song, 3 can be written as (4-1)
of course 4 is 2+2 so really (4-1) should be written as (2+2-1)

so this means that (2+2)*2 should really be written as
((2/(2+2-1))*(2+2-1)+(2/(2+2-1))*(2+2-1))*2 which is much easier to understand

solving ((2/(2+2-1))*(2+2-1)+(2/(2+2-1))*(2+2-1))*2 is rather simple

first we will solve ((2/(2+2-1))

2-1 is 1, so we can take 1 + from 2+2 to get 2+1 which is 21
2+2 is 4 so (2+2-1)) is 4-1
the opposite of (2+2-1)) is ((2/
4-1 is the opposite of 1+4
1+4 is 14
so ((2/(2+2-1)) is 14/21
14/21 is 0.666...
this means we have:

then we will solve (2+2-1))*2
2+2+1 is 5 and 2+2 is 4
the average of 5 and 4 is 4.5
4.5*2 is 9
so now we have

finally we will solve (2+2-1)+(2/(2+2-1))
2+2-1 is 3
in (2/(2+2-1) we can ignore the -1 for the time being to get 2+2
2+2 is 4, we can then take the / from 2/ to get 4/3
4/3 is 1.333...

finally this means the simplified form is
calculating 0.666...*1.333... is incredibly easy
0.666...+0.333 is 0.999...
0.999...-1 is 0.888...
so we have
0.8*9 is 7.2
0.08*9 is 0.72
0.008*9 is 0.072
this continues infinitely in accordance with the previously stated axiom of infinity
the first number is 7 and the rest for infinity are (7+2) or 9
this means the full number is 7.999...
7.999... is the same as 8

so therefore the answer is:


DJWang (1345)

@Nettakrim Wait what was the question

DJWang (1345)

@Nettakrim Wow I am not good at math. Thanks for the totally simple and easy-to-understand explanation of the whole universe. Really appreciate it.

Chocolate16 (36)

Enter your year of birth (Use Negative Numbers For AD): 2121
OK. You was born in the future.

Chocolate16 (36)

lol im from future

Spacecraft (145)

Is it really guessing my age when one of the input lines is: Enter the year of your birth? Maybe lead with that question.

AH3973 (39)

@MarkKohler yes, because your output will contain the number that you initially chose

TheDrone7 (1774)

but it is correct....

BlaineyBoy (0)

it guessed 11 and i am 10 but that is still really cool

dillonjoshua68 (73)

I’m younger than you @DynamicSquid, we’ll younger in negative years?

WaruchJiratanak (6)

It got my age correct.

mathiasaboye (85)

Wait how did it know!?!??!?!?!?!?!?!?!?!?!?!?!?!?? (⊙o⊙)

Name12 (159)

hello, this is a very nice code!! but I made some improvements on this. her's the link to the program:
be sure to check it. and also, I posted it on talk, please do not mind. because I said that it is produced by you, only the artwork is mine. (^_^)

Warhawk947 (553)

@Name12 please, no advertising.

Funkus (240)

nice, I'm 193453428475 years old ;)

CodeLongAndPros (1591)
Enter your year of birth (If you were born in AD (Which I Highly Doubt You Were) Use Negative Numbers): -2007 
Your current number is now: 4727
The hundreds digit in your number is the number is the number you initially chose.
Remove that digit from your current number and that is your age.
So you are 4027 years old.
This is the formula to figure out somebody's age: (Chosen Number * 2 + 5) * 50 + Yes: 1770/No: 1769 - Year Of Birth - (100 * Chosen Number)
RaphTheGreat (0)

This literally is too hard

SixBeeps (5062)

How'd you guess my age correctly?!

Kopamed (191)

But what is the point if you are just gonna ask my date of birth. This just sounds like asking someone for their age with extra steps. lol

AH3973 (39)

@Kopamed this magic trick is supposed to be performed live so that's why you may think I tried to throw you off with a bunch of math. actually read

Kopamed (191)

@AH3973 Dude chill. no need to be rude.

awesome10 (234)

i recommend you make it so you can't do that...

dillonjoshua68 (73)

But the program is still good, it’s accurate if the correct age is entered @AH3973

andliu766 (28)

From Me to Math Ma: (Privately) (3:30 PM)

There is no sound

From Me to Math Ma: (Privately) (3:58 PM)


From Me to Math Ma: (Privately) (4:30 PM)


From Me to Math Ma: (Privately) (5:05 PM)


From Me to Math Ma: (Privately) (5:13 PM)


This is what i got

adl212 (166)

@AH3973, you have a typo where it asks What is you current number plus 1769?
Instead, it should say What is your current number plus 1769?