Python help - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32) +---- Thread: Python help (/showthread.php?tid=4775) |
Python help - Kharnage - 02-12-2010 Ok so for hw I have to calculate # seconds = how much in years, days, hours, minutes, seconds. So if I put in 60 seconds it should come out: 0 years 0 days 0 hours 1 minutes 0 seconds When I put something it goes to the first thing and then it stops. For example if I put 60 it comes out 0 year and then it stops. How can I make it print through everything? Code: seconds_per_year=60*60*24*365 RE: Python help - uber1337 - 02-12-2010 Turn the "elif"'s into "if"'s. That should help. RE: Python help - Kharnage - 02-12-2010 Thanks, that works. |