Untitled

mail@pastecode.io avatar
unknown
plain_text
16 days ago
737 B
1
Indexable
Never

    def get_max_salary(self) -> int:
        biggest_salary = 0

        for job in self.jobs_list:
            try:
                int(job["max_salary"])
            except ValueError:
                continue

            if int(job["max_salary"]) > biggest_salary:
                biggest_salary = int(job["max_salary"])

        return biggest_salary

    def get_min_salary(self) -> int:
        smallest_salary = self.get_max_salary()

        for job in self.jobs_list:
            try:
                int(job["min_salary"])
            except ValueError:
                continue

            if int(job["min_salary"]) < smallest_salary:
                smallest_salary = int(job["min_salary"])

        return smallest_salary
Leave a Comment