I am making a text based russian roulette game in Python, but I am not nearly finished, as one can see just by looking at my code:
#!/usr/bin/env python
prin
Use raw_input
for your paname
and pbname
variables. Be sure to import random
at the top of your file. It would also be better to use int(raw_input("How many..."))
for bulletcounter
, too, I think, than input
, since this can be used to evaluate any arbitrary python code.
Also, it would be worth checking to see which version of Python you are using, when you invoke it using the env
command. If, at the command line, you run:
/usr/bin/env python -V
and are getting "Python 2.x.y" instead of Python 3, and you are expecting to be using Python 3, consider changing that first line to call your Python 3 interpreter instead. The recommendations noted above assume you are using Python 2.