OneCompiler

positiveAndNegativeNumbers

193
numbers = [-3, 101, 97, -13, 41]
positive_numbers = list()
negative_numbers = list()

'''
while I didn't reach the end of the collection:
  1. check if element's value is > 0
      add to positive
  2. otherwise check if element's value is < 0
      add to negative
  increment the step to the next element
'''

start = 0
step = start
stop = len(numbers)
# while I didn't reach the end of the collection:
while step < stop:
    element = numbers[step]
    # 1. check if element's value is > 0
    # add to positive
    if element > 0:
        positive_numbers.append(element)
    # 2.otherwise check if element 's value is < 0
    # add to negative
    elif element < 0:
        negative_numbers.append(element)
    # increment the step to the next element
    step = step + 1