Last active
October 24, 2017 22:31
-
-
Save ysnerdem/0ad88f085c65d3b3c92e164ae9ffa78e 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
numbers = [] | |
while True: | |
num = int(input('Enter number:')) | |
numbers.append(num) | |
if len(numbers) == 10: | |
break | |
neg_nums = 0 | |
pos_nums = 0 | |
zero = 0 | |
for i in numbers: | |
if i > 0: | |
pos_nums += 1 | |
elif i < 0: | |
neg_nums += 1 | |
else: | |
zero += 1 | |
print("negative numbers:",neg_nums) | |
print("positive numbers:",pos_nums) | |
print("zeros:",zero) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment