Skip to content

Instantly share code, notes, and snippets.

@brunoperezm
Created June 16, 2012 03:23
Show Gist options
  • Save brunoperezm/2939790 to your computer and use it in GitHub Desktop.
Save brunoperezm/2939790 to your computer and use it in GitHub Desktop.
Simple diagrama de flujo hecho en un programa
# -*- coding: utf-8 -*-
sumatoria_n1 = 0
sumatoria_n2 = 0
for x in range(10):
n1 = raw_input('Nota del alumno ' + str(x) + ' en matematica: ')
n2 = raw_input('Nota del alumno ' + str(x) + ' en fisica: ')
try:
int(n1)
int(n2)
except:
print "Tenes que poner un numero hermano. Ya la cagaste, no voy a tener en cuenta la nota {x}".format(x=str(x))
continue
if x == 5:
alumno15mate = float(n1)
alumno15fisic = float(n2)
# Sumatoria
sumatoria_n1 = sumatoria_n1 + float(n1)
sumatoria_n2 = sumatoria_n2 + float(n2)
promedio_mate = sumatoria_n1/10
promedio_fisc = sumatoria_n2/10
#print promedio_mate
#print promedio_fisc
if promedio_mate > promedio_fisc:
print "***********************************************\n Es mas alto el promedio en matematica"
else:
print "***********************************************\n Es mas alto el promedio en fisica"
if alumno15mate > alumno15fisic:
print "El alumno 5 tiene mas promedion en matematica \n ***********************************************"
else:
print "El alumno 5 tiene mas promedio en fisica \n ***********************************************"
raw_input("\n \n Eso fue todo. Presiona enter para salir")
from distutils.core import setup
import py2exe
setup(
options = {'py2exe': {'bundle_files': 1}},
zipfile = None,
console=['main.py']
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment