
March 20th, 2013, 03:26 AM
|
|
Contributing User
|
|
Join Date: Jul 2007
Location: Joensuu, Finland
|
|
Quote: | Originally Posted by dariyoosh This is not how you write a for loop in python. |
Actually it looks like there’s not even a need for a “for” loop.
Code:
def lab3q3(org, rate, hourstake, hours):
if hours > hourstake:
return org*rate*(hours/hourstake)
else:
# return something else here
__________________
My armada: openSUSE 12.3 (home desktop, laptop, work desktop), Ubuntu 12.04 LTS (mini laptop), Debian GNU/Linux 7.0 (server), Mythbuntu 12.04 LTS (HTPC), Bodhi Linux 2.0 & Windows 7 Ultimate (test desktop), FreeBSD 9.1 (test server)
|