Last active
December 16, 2015 10:09
-
-
Save felipecabargas/5418245 to your computer and use it in GitHub Desktop.
Histograma from progra.usm.cl
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
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