0 Replies - 1940 Views - Last Post: 09 August 2012 - 11:53 AM Rate Topic: -----

#1 Miikalsen  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 85
  • Joined: 29-December 11

Cx_freexe compiled program close once it's started

Posted 09 August 2012 - 11:53 AM

So i created a .exe out off my python program using CX_Freeze as Py2Exe is not working with 3.2 version of python.


It creates all the files into a map, but once i start the .exe file it closes right away.

Idk what i should do with this problem..


The source i compiled :

import random

def main():
    ranNum = (random.randint(1, 100))
    howGue = 0

    while True:
        choice = int(input ("Guess what the number is (1/100): "))

        if (choice > 100):
              print ("That's not a valid number, guess between 1 and 100")

        elif (choice < ranNum):
            howGue +=1
            print ("Too low, try again")

        elif (choice > ranNum):
              howGue +=1
              print ("To high, try again")
              
        elif (choice == ranNum):
            howGue +=1
            print ("You got the right number")
            print ("The Number was : ", ranNum)
            print ("You Guessed ", howGue  , " Times")
            break
        elif (choice > 101):
              print ("That's not a valid number, guess between 1 and 100")

        else:
            print ("Not a valide number")


print ("Welcome to PyGuess")


main()


again = input ("Would you like too run the program over again Y/N?")

if again == "Y":
    main()

elif again == "y":
    main()
else:
    stop = input ("Okay, Take care and come again!")
           
   





Thanks in advance

Is This A Good Question/Topic? 0
  • +

Page 1 of 1