Jump to content

Making python 3.2.5 more economical?

mattonfire

Oops, I  made a little booboo.

  #close your files, this is a good habit to get into, trust me        f1.close        return    

That code is technically incorrect. I forgot the parentheses after close. So make it look like this:

  #close your files, this is a good habit to get into, trust me        f1.close()        return     

This is why making code readable is important, it makes little mistakes like this one easier to find.

Ah okay, I put that in. For some reason it won't times the price.

ZmCJpny.png

Link to comment
Share on other sites

Link to post
Share on other sites

Ah okay, I put that in. For some reason it won't times the price.

ZmCJpny.png

 

 

You found another bug. My bad.

        try:                ask = int(ask)               #print away            for i in range(ask):                print(price)                #done = True  # <--- these two lines were the problem                #break        # <--- they were indented wrong.             done = True # these are correct            break # <---        except ValueError:            print ("Thats not an integer!")            done = False
Link to comment
Share on other sites

Link to post
Share on other sites

 

You found another bug. My bad.

      snip

Found another bug, this is a simple one to fix thought. It's still counted as a string when you input. I need to convert it to a integer. 

toXSmDn.png

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×