Login Register






[Python] Guess your number filter_list
Author
Message
[Python] Guess your number #1
I wrote this a while ago and forgot all about it if I'm honest, Deque reminded me with her competition here. it's nothing special you think of a number and the program guesses it and prints out how many tries it took

Code:
# Guess your number # Player thinks of a number between 1 and 100 and the computer tries to guess it import random print "Think of a number between 1 and 100." print "And I will try to guess it." tries = 0 guess = "" high = 100 low = 1 while guess != "c": number = random.randrange(low, high) print "I think of: ", number guess = raw_input("[h]iger, [l]ower, [c]orrect: ") if guess == "h": low = number +1 tries += 1 if guess == "l": high = number -1 tries += 1 print "I got it in ", tries, "go's!" raw_input("\n\nPress the enter key to exit.")
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

[Python] Guess your number #2
I wrote this a while ago and forgot all about it if I'm honest, Deque reminded me with her competition here. it's nothing special you think of a number and the program guesses it and prints out how many tries it took

Code:
# Guess your number # Player thinks of a number between 1 and 100 and the computer tries to guess it import random print "Think of a number between 1 and 100." print "And I will try to guess it." tries = 0 guess = "" high = 100 low = 1 while guess != "c": number = random.randrange(low, high) print "I think of: ", number guess = raw_input("[h]iger, [l]ower, [c]orrect: ") if guess == "h": low = number +1 tries += 1 if guess == "l": high = number -1 tries += 1 print "I got it in ", tries, "go's!" raw_input("\n\nPress the enter key to exit.")
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

[Python] Guess your number #3
I wrote this a while ago and forgot all about it if I'm honest, Deque reminded me with her competition here. it's nothing special you think of a number and the program guesses it and prints out how many tries it took

Code:
# Guess your number # Player thinks of a number between 1 and 100 and the computer tries to guess it import random print "Think of a number between 1 and 100." print "And I will try to guess it." tries = 0 guess = "" high = 100 low = 1 while guess != "c": number = random.randrange(low, high) print "I think of: ", number guess = raw_input("[h]iger, [l]ower, [c]orrect: ") if guess == "h": low = number +1 tries += 1 if guess == "l": high = number -1 tries += 1 print "I got it in ", tries, "go's!" raw_input("\n\nPress the enter key to exit.")
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

RE: [Python] Guess your number #4
Haha, nice. I guess you don't want to make it a challenge submission?
Oh, and I am thinking of a number ...
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [Python] Guess your number #5
Haha, nice. I guess you don't want to make it a challenge submission?
Oh, and I am thinking of a number ...
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [Python] Guess your number #6
Haha, nice. I guess you don't want to make it a challenge submission?
Oh, and I am thinking of a number ...
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [Python] Guess your number #7
I could do but you stated you didn't want anything like the guess the number game and with this being so similar I din't think you'd want it


is it 2?
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

RE: [Python] Guess your number #8
I could do but you stated you didn't want anything like the guess the number game and with this being so similar I din't think you'd want it


is it 2?
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

RE: [Python] Guess your number #9
I could do but you stated you didn't want anything like the guess the number game and with this being so similar I din't think you'd want it


is it 2?
If you need help feel free to PM me
[Image: klfpJD]
Probitcoin
Freebitcoin
BTC clicks
bitcoin wallet:
1FBPAanbs3rJU9BUpobpDJc9hHUaCaC25N

Reply

RE: [Python] Guess your number #10
(02-09-2013, 04:23 PM)chmod Wrote: I could do but you stated you didn't want anything like the guess the number game and with this being so similar I din't think you'd want it


is it 2?

No, I only said you won't get 500 points for it as it is not worth so much. You may get 200 for that. Biggrin

No. Higher.
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply