No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
8 Posted Topics
Not usually one to have to do this, but I cannot find the problem with my code. Yes, this is a project Euler problem. Any tips or suggestions help. My code works by getting the location of each number, excluding the first numbers as it has to be predefined, and …
a1 = 1 a2 = 2 a3 = 3 ....... a10000 = 10000 So, I want to create a function that will autoassign names to numbers. In the the code above, for x in range (desired range): a(quantity of x) = x how do i get my code to call …
Very ineffiecent way of doing it would be to add all of the info to one list, then make a for or while loop saying that every 3rd item is a new line. for x in range (len(list)): while counter != 3: counter = counter + 1 print (list[secondCounter]) print …
Perphaps an archive viewer is what you are looking for, or, assuming you are the one creating the files, you could make a main python file and use it to import the other python files and it will automatically build a pycache.
Right click on a webpage and inspect element, that might help you. You could also do this in pygame fairly simply.
My suggestion is to make it a global file in the Main file and just input it into the class or function when you call it. Add it to the list of items asked for when running the program.
So I have been working on a directory and have not really been able to get it off the ground. As a matter of fact none at all. import H:\Python Helpful Programs\DivisibleBy.py (also: everything is in the same folder) I have also tried just DivisibleBy.py and some others. The error …
So my code to test a prime number is as follows: PrimeTest(): test = input ( "What number would you like to test? " ) test = int(test) true = 0 divisor = 0 for divisor in range (2, 10): if ( (isinstance( test/divisor, int )== True) & (test/divisor == …
The End.
bnn678