Created
October 30, 2015 23:12
-
-
Save restrepo/32615e0f5d9a72406f27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import sys | |
if __name__ == '__main__': | |
# create the parser | |
parser = argparse.ArgumentParser( | |
description='''Calcula el valor de la descarga académica | |
para un proyecto''') | |
# add the arguments | |
parser.add_argument( | |
'--hour', action='store_true',help='Valor de la hora') | |
# parse the command line | |
args = parser.parse_args() | |
month=float(raw_input('salario mensual:')) | |
hour=month*1.6992/240. | |
week=float(raw_input('Dedicación horas semanales:')) | |
months=float(raw_input('Número de meses dedicados al proyecto')) | |
months2y=months-12 | |
if months2y>0: | |
months=months+0.035*months2y | |
print months | |
total=hour*week*4.28*months | |
print total | |
if args.hour: | |
print 'Valor hora: %.2f' %hour | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment