Forum: Python May 22nd, 2008 |
| Replies: 8 Views: 280 Re: How long the account can last Here's a bit of code to get you started. You'll have to play with it to do things like validating input, etc.
init_amt = float(raw_input('Enter the initial amount, in $ '))
int_rate =... |
Forum: Python May 22nd, 2008 |
| Replies: 8 Views: 280 Re: How long the account can last Check the amount of interest earned each month (amt * rate/12). If this is greater than what you're taking out of the account, then you'll never deplete the account, so there's no point in trying to... |
Forum: Python May 22nd, 2008 |
| Replies: 3 Views: 240 Re: Writing arrays to a column of a spreadsheet? If your array is a list, just create a string for each array using "tab.join(array)", then write the string to a sequential file. Use Excel (or whatever the open-office equivalent is) and import it... |
Forum: Python May 22nd, 2008 |
| Replies: 5 Views: 222 Re: how to handle large lists? I have to agree with EneUran - the size of the list is, or at least should be, irrelevant.
Athirar, can you post a code sample and your list? |
Forum: Python May 20th, 2008 |
| Replies: 1 Views: 130 |
Forum: Python May 20th, 2008 |
| Replies: 4 Views: 359 |
Forum: Python May 14th, 2008 |
| Replies: 4 Views: 241 |
Forum: Python May 14th, 2008 |
| Replies: 4 Views: 241 |
Forum: Python May 13th, 2008 |
| Replies: 4 Views: 265 Re: To stop a loop The command you want is 'break'. I'll leave it to you to look up the syntax. There are a couple of ways you can test for what you need. First, lists have a 'sort' method. Use that to tell what the... |
Forum: Geeks' Lounge May 12th, 2008 |
| Replies: 352 Views: 15,839 Re: There is an elephant on the loo! Don't know whether it's true or not. The story I heard is that it was developed because typists were so proficient using earlier formats, that they were jamming the machines - they could type faster... |
Forum: Geeks' Lounge May 12th, 2008 |
| Replies: 352 Views: 15,839 Re: There is an elephant on the loo! There was a 4th - Clara Hughes of Canada: Individual Road Race Cycling bronze and Individual Time Trial Cycling bronze (1996) and 5,000 m Speed Skating bronze (2002).
Christa Luding-Rothenburger of... |
Forum: Python May 12th, 2008 |
| Replies: 8 Views: 317 |
Forum: Python May 12th, 2008 |
| Replies: 8 Views: 317 Re: "choose" in Python? I'm going to feel really stupid when I see the answer to my question, because I'm sure I've seen it before and I've just forgotten. Anyway, I was just fiddling with this example, and I can't remember... |
Forum: Python May 12th, 2008 |
| Replies: 3 Views: 381 Re: Python CSV help! How do you think it should be approached? What do you think needs to be done? Let's hear your ideas first - even in English rather than in Python, if that's easier. We can take it from there. |
Forum: Geeks' Lounge May 10th, 2008 |
| Replies: 31 Views: 1,887 Re: The Stupid Test -- Are you stupid??? Tried - gave fake name and addy info, skipped through about 20 of these "special offers" and the thing froze. I know I'm not stupid, at least not stupid enough to try twice. |
Forum: Geeks' Lounge May 8th, 2008 |
| Replies: 575 Views: 26,270 Re: 2008 US Presidential Poll Because it gives them more options - a less powerful weapon would allow you to cause limited damage in a geographically limited area. A massive weapon would cause more widespread damage, which may... |
Forum: Geeks' Lounge May 8th, 2008 |
| Replies: 5 Views: 318 |
Forum: DaniWeb Community Feedback May 8th, 2008 |
| Replies: 15 Views: 1,077 Re: How do I delete my DaniWeb Account? Wait a second - people ask for homework help on a forum? What's next - paying to have the work done?
Seriously, though, that's a very good possibility. Back in my day, there was no internet to do... |
Forum: Posting Games May 7th, 2008 |
| Replies: 408 Views: 25,463 |
Forum: Posting Games May 7th, 2008 |
| Replies: 3,319 Views: 103,259 |
Forum: Posting Games May 7th, 2008 |
| Replies: 4,582 Views: 97,720 |
Forum: Posting Games May 7th, 2008 |
| Replies: 176 Views: 4,401 |
Forum: Geeks' Lounge May 7th, 2008 |
| Replies: 17 Views: 985 |
Forum: Geeks' Lounge May 7th, 2008 |
| Replies: 47 Views: 1,820 |
Forum: Geeks' Lounge May 7th, 2008 |
| Replies: 5 Views: 319 |
Forum: Python May 7th, 2008 |
| Replies: 6 Views: 362 Re: Finding .CSV averages I can't see your data, so I can only guess at what it might contain. But I would think that to find the "most productive" director, you'd want to find the average for each director, and sort these... |
Forum: IT Professionals' Lounge May 6th, 2008 |
| Replies: 5 Views: 849 |
Forum: Python May 6th, 2008 |
| Replies: 3 Views: 271 Re: What's going on with python-forum.org? Well, the last problem was fixed within a day after I sent an email (not a PM) to one of the admins. I'll have to do the same tonight when I get home. I think it would look better if I complain about... |
Forum: Python May 6th, 2008 |
| Replies: 4 Views: 349 Re: Delete duplicate and zero fram list Create a new list called 'b'. Then pass through list 'a', and check each element against list 'b'. Use the 'append' method to add to list 'b' if you need to.
And for what it's worth, I probably... |
Forum: Python May 6th, 2008 |
| Replies: 3 Views: 273 Re: confused by import command If you use "import socket", you will import everything from the "socket" module whether you need it or not, but with "from socket import *", you can actually specify what you want to import.... |
Forum: Python May 6th, 2008 |
| Replies: 3 Views: 271 What's going on with python-forum.org? I hope people don't mind seeing references to other forums here.
I'm a regular at www.python-forum.org (http://www.python-forum.org) but lately I've been having problems with the site. Last week, I... |
Forum: Python May 6th, 2008 |
| Replies: 3 Views: 359 Re: python-csv data problem Before "for line in data", set a line counter to 0. Inside the loop, increment the counter. Only when it is > 1, print the line. |
Forum: Python May 6th, 2008 |
| Replies: 4 Views: 349 Re: Delete duplicate and zero fram list The easiest way would probably be to create a new list ('b', perhaps? You've defined 'b' in your function but never use it). Then copy each item from 'a' to 'b' unless it is 0 or already in 'b'. |
Forum: Python May 2nd, 2008 |
| Replies: 4 Views: 302 Re: I can't figure out how to strip punctuation Use the string module - it has a built-in for lower-case letters. This is preferable to specifying the ASCII characters - what happens if you run on an EBCDIC system? You're better off seeing if... |
Forum: Geeks' Lounge May 2nd, 2008 |
| Replies: 20 Views: 842 |
Forum: Geeks' Lounge May 2nd, 2008 |
| Replies: 20 Views: 842 Re: Why women live longer than men. Actually the way I heard it was more like this - Why do married men die younger? They want to!
(And before anyone complains, yes, I am married, and no, I don't feel that way personally). |
Forum: Geeks' Lounge May 2nd, 2008 |
| Replies: 14 Views: 446 |