Skip to content

Instantly share code, notes, and snippets.

@restrepo
Created October 30, 2015 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save restrepo/32615e0f5d9a72406f27 to your computer and use it in GitHub Desktop.
Save restrepo/32615e0f5d9a72406f27 to your computer and use it in GitHub Desktop.
#!/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