- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
6 Posted Topics
There are really two ways of handling this problem. The first, more along the lines of what you are asking, is to check each character one at a time for it to be in one of the three following groups: [LIST=1] [*]Characters that are equal to '0' [*]Characters that are …
I am having some problems with merging a large number of text files. Basically I am attempting to merge upwards of 2000+ text files that could range anywhere in size from 1 megabyte to multiple gigabytes in size each. Thus implementations must use some form of buffering in order to …
I'm sure I missed something simple but I'm getting frustrated with this code simply because I'm so sure it should work. I have created a short program for exporting some XML data was use at the office into .tsv files. I have a thread dedicated to reading the xml data …
[QUOTE=jwxie;1047415]This is a sample code I looked up. I am a rookie and I do not really understand it. [CODE]n = int(input('Enter an interger >= 0:')) fact = 1 for i in range(2,n+1): fact = fact*i print(str(n)+' factorial is '+ str(fact)) [/CODE] [/QUOTE] The range function will generate a list …
It's a little hard to tell from your code (no tabs) but I'm guessing from the error that you have the test_file.close() line tabbed in the for loop code. If you think about how a for loops works, it will execute each line of the body one at a time …
Two things. [CODE=python]while rounds > player_point or cpu_point:[/CODE] This goes on forever because of the order of operator precedence. In this case, comparison operators are checked before boolean operators. So on the first move python will convert it to say: while <True | False> or cpu_point. The true | false …
The End.
erees