Shamir 2

 avatar
shinta0x01
plain_text
3 months ago
859 B
2
Indexable
Never
total = 0
largest = None
smallest = None
total_pos = 0
total_neg = 0
count_neg = 0
count_50_100 = 0

for i in range(10):
    num = int(input("ENTER NUMBER : "))
    total += num
    if largest is None or num > largest:
        largest = num

    if smallest is None or num < largest:
        smallest = num

    if num > 0:
        total_pos += num
    elif num < 0:
        total_neg += num
        count_neg += 1

    if 50<= num <= 100:
        count_50_100 += 1
print("-------------------------------")
print("THE TOTAL IS: ", total)
print("THE LARGEST NUMBER IS: ", largest)
print("THE SMALLEST NUMBER IS: ", smallest)
print("THE TOTAL OF ALL POSITIVE NUMBER IS: ", total_pos)
print("THE TOTAL OF ALL NEGATIVE NUMBER IS: ", total_neg)
print("THE TOTAL NEGATIVE NUMBERS ENTERED IS: ", count_neg)
print("THE NUMBERS BETWEEN 50 and 100 ARE: ", count_50_100)
Leave a Comment