def isValidPasswordPartOne(lowerBound: int, upperBound: int, targetLetter: str, password: str) -> int:
   """
   Takes a password and returns 1 if valid, 0 otherwise. First part of the puzzle
   """

   validSoFar: bool = True
   letterCount: int = 0
   
   for char in password:
      if char == targetLetter:
         letterCount += 1
      if letterCount > upperBound:
         validSoFar = False
         break
   
   return 1 if validSoFar and letterCount >= lowerBound else 0