Share your repls and programming experiences

← Back to all posts
Age/Birthday Guessing AI
OldWizard209 (1499)

So you run this program and provide answers for the questions and it gives an answer, which is your birthday/age. This program is fun and good if you want to impress your friends. But actually its simple math.

This program is meant to guess your age in 2020 ONLY so, if you use this program to guess your age next year, it won't work.

Thanks to @RYANTADIPARTHI and @adsarebbbad for helping me out and also thanks to @Bookie0 for providing suggestions.

EDIT: At first, I mistakenly wrote that the last digit is your age in the number you get while finding your age. But actually it is the last two digits. Sorry, for the inconvenience.

And try this out and let me know how it is :)
https://repl.it/talk/share/THIS-PROGRAM-GUESSES-THE-NUMBER-YOU-PICKED/77334

EDIT: OKAY, so almost everyone in the comments are saying that if I asked for the birth year, I can easily know the age, but lets get this clear. If I subtract your birth year with 2020, you get ONLY your age. But when you solve the maths you get a three-digit number. the first digit is the number you picked in the first step and the last two digits are your age, And also take a look at the code and see if I have subtracted your birthyear by 2020

:)

Anyways, Enjoy :)

Comments
hotnewtop
Jeydin21 (106)

Very tricky. A+ for actually manipulating my brain.

OldWizard209 (1499)

THANKS A LOTTT GUYS, MY PROGRAM FINLLAY HIT TRNDING. YAYYYYYYYYYY

JamesonCalhoun (5)

But it asks for your birthyear so it already knows how old you are

JasonLiu19 (71)

@JamesonCalhoun He subtracts that by 17500 or 1769(I think), not by 2020.
Edit: 1750*

OldWizard209 (1499)

Yup, FINALLY someone who understands what, I did.
@JamesonCalhoun, The final answer you get gives you the number you picked aswell as your age, so if I subtracted your birthyear by 2020, I would give you only your age :)

[deleted]

Ur program gave me the wrong answer 24 times but on the 25 try it was actually right I’m gonna upvote u for being a [email protected]

OldWizard209 (1499)

WDYM can u give me an example of the answer @MemeDriod

[deleted]

So for the 1-24 try’s it would give me the answer of 2009 and it would go all the way to 2014 and repeat but right on the 25 try it gave me 2008 and that was correct idk wut I did on the last [email protected]

OldWizard209 (1499)

Ok so u got 2009 that means u were born on the 20th of September, am i right? The birthday program is meant to find out ur date and month of birth :) @MemeDriod

[deleted]

No me birthday is 2008 September [email protected]

[deleted]

Ur stalking machine doesn’t [email protected]

[deleted]

Oof I mean [email protected]

[deleted]

Forget about [email protected]

OldWizard209 (1499)

The first two digits in the program in finding the birthday gives u the day u were born and the last two gives u the month u were born @MemeDriod

[deleted]

No u specifically wrote 2009 that would make me [email protected]

OldWizard209 (1499)

Yes bro the program DOSENT find out ur YEAR if birth but the month and date @MemeDriod

[deleted]

That was 3 long years [email protected]

[deleted]

Dude let’s forget about this I’m trying to eat but my hand can’t leave the keyboard if u keep chatting @abdullahrajput9

[deleted]

Ok plz let me [email protected]

MMarkosPro21 (15)

nope, the answer for my birthday year was 2102 and I'm guessing it thought I was born on 2002. i was not lol

AndrewAung11 (21)

How is this possible? For me it gave me 3 numbers and said "The last two digits are your age"!

ch1ck3n (2035)

The answer is 511.

The last digit is your age

I AM NOT FREAKING ONE YEARS OLD

CompilingCoder (9)

@ch1cken Are you 11? I think that was what the program meant.

OldWizard209 (1499)

The last TWO digits are your age @ch1cken

The first number is the one you picked in the first step.

It was a typo in my program and it says first digit is your age, but actually the last two digits are your age

CompilingCoder (9)

@ch1cken Oh I thought you were because it said 511 and 11 was the last two digits.
Anyways I am silly :), you can't join replit until you are 13 or over. It is in the rules :D. So obviously you can't be 11 :P.

ch1ck3n (2035)

Ya asked for my birthdate a++

sop87 (5)

lol this is really cool i found this on the talk page today and it is actually my bday!

OldWizard209 (1499)

Happy Birthday!!!! @sop87
Thanks :)

[deleted]

there is something wrong with this i put that i was born in 2 ad and it broke

OldWizard209 (1499)

Umm.... tis may be a bug in the program I can't fix, or maybe it is because you mistakenly clicked Enter without realizing. But try running the program again and see if it works. @bowmand117

[deleted]

@abdullahrajput9 i tried sevral times with the same age. its still bugging

OldWizard209 (1499)

IDK What the problem is then @bowmand117
Sorry _

arpolepalli (0)

OMG 😮 I was born on Jan 16th!!!!!!!!!!!

AaronMcMillan3 (0)

OMG I TELL IT WHAT MY BIRTHDAY IS AND SOME HOW IT TELLS ME WHAT MY BIRTHDAY IS!!!!!!!!!!!

AaronMcMillan3 (0)

still pretty cool though

WalrusesAwesome (1)

How did it guess the month and day of my birth given only the month and day of my birth???

OldWizard209 (1499)

@WalrusesAwesome I asked for your date and month of birth but then i put them in one answer SHOWING you the math. This trick is meant to be be done by a person himself so only he knows the date and month of his birth but this is a program so things work differently :)

SeamusDonahue (457)

it was one day off my bday

[deleted]

apparently i was that paranoid about it saving my birth year that i checked if the code contained some hidden database system

NoNameByProgram (198)

pls define a function next time for the printing slow

OldWizard209 (1499)

I know I cud have done that but i was lazy xD @NoNameByProgram

NoNameByProgram (198)

@abdullahrajput9 lmfao sorry for the inconvenience

elizurfk (17)

I think your thing got date, and month mixed wrong

elizurfk (17)

Your thing was wrong, it said my birthday was 10/04 but it is the opposite; 4/10. I think it is a little off, but otherwise good.

Stan085 (23)

Wow uses a lot of good math

OldWizard209 (1499)

Umm Thanks @Stan085 I kinda love math and this is a very old trick my grade 1 teacher played on me

Stan085 (23)

@abdullahrajput9 oh, well its still great, even if you didn't come up with it yourself :)

[deleted]

dude who made this formula @abdullahrajput9

OldWizard209 (1499)

Umm its a simple math trick TBH :) @ilovebeef

[deleted]

no i mean there has to be person behind this seriously @abdullahrajput9

OldWizard209 (1499)

In truth you can actually go to YouTube and see this trick but I use it as a way to impress my friends and make them think that I am a frickking GENIUS @ilovebeef

[deleted]

how old r u? are u 12 or 21 pick [email protected]

OldWizard209 (1499)

I will turn 13 in December actually @ilovebeef

CuriousMonkey (48)

U STALKEERRR HOW U KNOW MY AGE xD xD xD xD xD

Baconman321 (1097)

Actually worked, but I find it's overly complex. Like, you asked for my birth date, you could easily ask for my birth year and subtract from current year. Nevertheless, cool. +1 from me (for making me not able to keep up).

OldWizard209 (1499)

LOL If I did that, It wouldn't impress anyone. The complexity is kind of the main objective in this post @Baconman321

Baconman321 (1097)

@abdullahrajput9 It's ok, but it asked two questions before I could answer the first one, so it got the number wrong (only off by 2, so still cool).

CallMeKeegan (2)

...it asked what year i was born... it was a lot of code for a subtraction problem that could've been answered in like the last tow questions, but still it worked well so :).

CallMeKeegan (2)

Also I chose age 2020-2007 add on the question: 'Did you have your brithday this year?' and bam subtraction.

OldWizard209 (1499)

@CallMeKeegan If I subtracted your birthyear by 2020, you would get only your age but in the final answer you get your age and number you picked.

CallMeKeegan (2)

@abdullahrajput9 ok but why is that necessary? Everything leading up to that point seems to me like filler to make it seem like its doing more than it actually is.

OldWizard209 (1499)

The point is, I am not asking for your birthday, but I am doin it with math. Just a way to impress your friends :) @CallMeKeegan

RayhanADev (2513)

Wrong! It said I was born in 2003 (My number was 2403) but I was actually born in 2006 ƪ(˘⌣˘)ʃ. But in all honestly nice program.

OldWizard209 (1499)

NGL, This program is made not to fail, because it is simple math. But, there are always flaws in any program soo... sorry @RayhanADev

RayhanADev (2513)

@abdullahrajput9 no problem, I’m not complaining. I just thought it was interesting that it messed up mine (my it’s something on my end ;P)

OldWizard209 (1499)

Can you try the program agin and see if it works @RayhanADev

RayhanADev (2513)

@abdullahrajput9 nice, it works! My birthday is indeed June 24th, 2006 you don’t need to know xDxDxD.

JamesonCalhoun (5)

Same with the other one. If you pay attention, it asks you the answer its trying to find.

JBloves27 (1878)

Errr, it was wrong?

OldWizard209 (1499)

There is no error. @JBYT27
7 is the number you picked and 10 is your age.
Ami i right?
Or left?

JBloves27 (1878)

lol, it's wrong. im...

big reveal...

11 lol @abdullahrajput9