• + 0 comments

    Clean Python Code:

    def countApplesAndOranges(s, t, a, b, apples, oranges):
        # Write your code here
        apple_count = 0
        orange_count = 0
        
        
        for i in range(len(apples)):
            apples[i] += a
            if s <= apples[i] <= t:
                apple_count += 1
                
        for i in range(len(oranges)):
            oranges[i] += b
            if s <= oranges[i] <= t:
                orange_count += 1
        
        print(apple_count)
        print(orange_count)