THIS PROGRAM GUESSES THE NUMBER YOU PICKED
You pick a number, keep it in your mind. You won't be asked for the number. The program is then gonna ask you a few questions. Answer them and using math, it will guess your number.
ENJOY :)
Upvote if you liked the program :)
it didnt guess my number for 6 attempts
no offence but is is Not possible . @BRUHIP
might be a mistake from ur side? @BRUHIP
Awesome!
UMMMMM........ THANKS :D @finnsterfran
Wow it works for me (cool stuff :D)
Im an idiot. I thought of 67
does not work for me at all
U have to enter yes or no ONLY @CadenGamble
@abdullahrajput9 thats weird tho in the code it has both in the if statment
Yes I changed it yesterday @CadenGamble
@abdullahrajput9 oh ok when i was messing with this the other day it had them both in the if statement unless you fixed but that makes sense
Yeah and I guess I didn't change for all of the statements cuz I was too lazy to just copy paste the code XD @CadenGamble
@abdullahrajput9 thats fair lol
yeah the same as @Bookie0 said
import sys, os, curses
import time
And this is the code:
st = 0.04
def sp(str):
for letter in str:
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(st)
print()
@ConorTseng lol why did you just copy what I wrote lol
@Bookie0 it was just a joke
It dosent have to be in all the lists that is why i am asking u if the number is in the list or no. And BTW u have to write yes or no not just y or n @AJDevelopment
For slowprint, you should make it in a function:
import sys, os, curses
import time
# And this is the code:
st = 0.04
def sp(str):
for letter in str:
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(st)
print()
I usually put it at 0.04 because it prints it not too fast and not too slow. But you can change it. Just change the value after st
Each time you want to do this typewriter effect, just do:
sp(“Hello World”)
;)
I know I can make a function but after it was done i was too lazy to change it :) Thanks for the suggestion tho @Bookie0
ok np! :) @abdullahrajput9
OK @Bookie0 I was kinda itching by looking at my code being soo ugly so I will change it to a function.
SOON.......
Changed, Thanks a lot to you :) @Bookie0
lol cool! :) @abdullahrajput9
Yeah its really cool how youve done this. To figure it out you take the first number in each of the lists you said yes to and add them together. Well done for putting it into code :)
Kinda like dat @BrokenVessel101
boi. 15 on tha dot
Thnx :D @dabombdgdzjr
i tried for 2 and it said my number was 0.
what???
NGL, this program dosen't fail so u must have entered the wrong answers @PlazmaDolphin
@abdullahrajput9
oh yeah i said y and n instead of yes and no that must have been it... sorry!
Yup unfortunately it dosent accept y and n so lemme change it @PlazmaDolphin
Bruh. You should choose trickery as your major, legit
I call it MATH @Jeydin21
AND BTW I am only 12 so i cant pick a major :(
@abdullahrajput9 doesn't the repl.it TOS say 13+ (i am not a moderator so i can't do anything about this)
UMMM actually i am turning 13 in December @AJDevelopment
@AJDevelopment Well, I'm pretty sure that there are some other very good coders on repl.it who posts regularly in Repl Talk that are under 13.
@AJDevelopment Also I don't think Repl.it would limit their services to 13 and older because coding is supposed to be available to everyone regardless of their age.
here's how you did it. It's WAY EASIER to understand if I made the list shorter. The list and yes or no questions are part of the trick in this program. Let's say I asked you to have a number in this list [1, 2, 3, 4, 5, 6]
. Let's say you chose 2. The first question he asks is even or prime by asking if the number is in this list [1, 3, 5]
. this already halves the chance of our answer. We say no. He now knows that it is an even number. He mixes it a little by asking whether it is in this list [1, 4, 5]
(changed some numbers). You say no. Ok, now he knows its an even number that is not 4. The final question: [1, 2, 4]
. Is it in this? He already knows it isnt 4 and 1, so if you say yes, its 2 but if you say no, its 6! You say yes and the number is determined as 2! Tricky, yet simple!
Ok YOU ARE BIG BRAIN @ThisUserTaken
@abdullahrajput9 i like math too
@ThisUserTaken Time for me to make sure the program can't guess my number!
@adl212 oh. it will if you answer correctly. the math works that way.
@ThisUserTaken Yup. unfortunately
trying to twist it up huh? but still good job using logical reasoning!
LOL I am not twisting it up, I am just analysing the data u provide and giving an answer based on that @ThisUserTaken
@abdullahrajput9 ik look at my other comment. i mean your kinda twisting with the list questions.
I know but thats what the program is made for ;) @ThisUserTaken
@abdullahrajput9 ye. good job!
Eh, its ok, i guess i'll upvote :)
Thanks @Stan085
Nice job!
that really really good ngl
nice work done ! Real cool
Thanks a [email protected]
how??? it guessed my number (think that's the point but whatever)
LOL @JasonLiu19
Its a simple math if you take it into consideration but the math is tricky, so you have to LOVE math to understand this
@JasonLiu19 look at my comment. Also, the Pokemon Battle game I made was by me. It was 1 month and 13 days older than that other person's. I have more evidence if you think I'm lying. -_-
Umm I dont get what u mean there @ThisUserTaken
@abdullahrajput9 its a long story. he accused me of copying someone else's program, but it was the other way around. That person forked my repl after 1 month and 13 days of I creating it. Sorry if you got a little confuzzled.
@abdullahrajput9 here's the post he said I "copied" https://repl.it/talk/share/Pokemon-Battle/59696. if you look at my repls and the other guys one. his is the exact same copy but created 1 month after I finished, so I was saying he forked mine instead of I copying him.
@ThisUserTaken never said you copied, was trying to find out who copied who(the guy is in one of my classes) and was suspicious because a.he was not doing well in that class and b.he is in 6th grade
@JasonLiu19 i am sorry for misunderstanding you lol. I thought you were on his side. Sorry for causing this trouble!
@JasonLiu19 ye. i really wish it said who forked who. I created that 6 months ago and started repl 3 months ago
That is pretty cool not gonna lie!
I honestly would've never had the brains to figure out how to do it. Good job!
did you just copy a post...that's trending...?
NOOOO This is a completely different program LMAO @NoNameByProgram
I made it
See it again @NoNameByProgram
@abdullahrajput9 why did you steal some code for no reason?
@abdullahrajput9 i saw it again. why did you have to edit it
It was a mistake, This program and the trending one were side by side so I mistakenly clicked that one. I than had to edit it after seeing ur comment @NoNameByProgram
LOL BTW I made BOTH @NoNameByProgram
Nice! The list stuff is cool!
Oh Thanks :) @KrazyOrange