Skip to content

Instantly share code, notes, and snippets.

@felipecabargas
Last active December 16, 2015 10:09
Show Gist options
  • Save felipecabargas/5418245 to your computer and use it in GitHub Desktop.
Save felipecabargas/5418245 to your computer and use it in GitHub Desktop.
Histograma from progra.usm.cl
pos = 0
neg = 0
print "Ingrese varios valores, termine con cero:"
c = '*'
while True:
num = int(raw_input())
if num == 0:
print "Positivos:", c*pos
print "Negativos:", c*neg
break
elif num > 0:
pos += 1
else:
neg +=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment