It's common in web browsers to have a text auto-fill function for
personal information or passwords or whatnot. The flavor that I'm
referring to is the kind that pops up as you're typing the word, not
the kind that fills text fields before typing has started.
Well I want to know how to do that in
Example: I'm driving a car in a game and I hit an oil slick so instead
of me having to lift off the throttle button on the keyboard, I want to
make a program to disengage the throttle as long as I'm on that oil
slick. Does that clear anything up?
--
http://mail.python.org/mailman/listinfo/python
I'm looking to make what's basically a macro for a computer game. But
I want this "macro" to take information from the game itself, so it's
not really a macro.
How do I access the data from my game to use in a program?
--
http://mail.python.org/mailman/listinfo/python-list
Code:
#The Guess My Number Game
import random
num = ""
guess = ""
counter = 7
num = random.randrange(1, 100)
print "I'm thinking of a whole number from 1 to 100."
print "You have ", counter, " chances left to guess the number."
print
guess = int(raw_input("Your guess is: "))
while counter != 0:
Thanks to all who replied. I did not ask for other iterations of my
program. I asked what was wrong with it. To those who did just that,
explained what was wrong, thank you for answering my question.
--
http://mail.python.org/mailman/listinfo/python-list
##Coin Flip: randomly flips 100 "coins" and prints results
##Original draft: june 27, 2005
##Chuck
import random
heads = 0
tails = 0
flips = 0
while flips < 99:
coin = random.randrange(0, 2)
if coin == 0:
heads = heads + 1
else:
tails = tails + 1