Comments (13)
This might be stolen from the book "Hello World" Im sorry but it might be lol
I fixed your program.
import random, os
print "Yo, how's it going?"
print "I want to see if you can guess a number between 1 and 100, you have 10 tries. "
def fart():
secret = str(random.randint(1, 100))
guess = 0
tries = 0
while guess != secret and tries < 10:
guess = raw_input("Have a try! ")
if guess < secret:
print "Get higher!"
elif guess > secret:
print "Get lower!"
tries = tries + 1
if guess == secret:
print "Oh my god! How smart you are!"
else:
print "What? You can't figure out the number?!"
print "You should have typed in " + str(secret) + "."
fart()
if raw_input("\nWould you like to try again? Y/N ").lower() == "y":
os.systen('cls')
fart()
How do we open it what program?
It's not that bad ahahaha! It even haves elements of a game. It's winnable if you do the right guesses. You can win in like 7-8 guesses if you do it right and don't have any "issue".
Anyways, I'm also doing stuff with Python, but I'm with pyGame, and I found this game because of that. Just remember to compile it before releasing, there are ways according to this site: http://effbot.org/zone/python-compile.htm, I hope that you're still around, GL.
Arr.. Don't about you guys, but Python is a complex programming language.
And I don't know if Zander789 copied it or not, but this is pretty nice.
Although I didn't actually get to play it, I did study the concept.
You need to guess the right number!
#arcade