Saturday, November 22, 2014

pyfact int

Python factoring program for Euclid challenge
open('Output.txt', 'w').close()
number=int(input("Enter:"))
text_file = open("Output.txt", "a")
text_file.writelines(str(number))
for x in range(2,number-1):
    text_file = open("Output.txt", "a")
    text_file.writelines(str(x)+str( number % x ==0 )+"\n")
input("Press Enter to Exit")

No comments:

Post a Comment