def fibSumThree(n0):
    
    """
Created on Mon Aug 23 07:40:53 2021

@author: Ezra

fibSumThree(n0) function to find the sum of all the terms in the
Fibonacci sequence divisible by three whih do not exceed n0.

Input: n0 is the largest natural number considered

Output: fibSumThree- the sum of the Fibonacci terms divisible by 3 that do
not exceed n0.
  
    """
    
    a=0
    b=1
    fibSum3 = 0
    while b < n0:
        if b % 3 == 0 :
            fibSum3 = fibSum3 + b
            
        c =a+b
        a=b
        b=c
    print("b=", "fibSum3",fibSum3)        
    return fibSum3