Skip to content

Commit

Permalink
Finished (maybe) get_last()
Browse files Browse the repository at this point in the history
  • Loading branch information
FanaticExplorer committed Dec 31, 2021
1 parent c17fae0 commit fe676c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions eolymp.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ def get_last(self):
if 'Зараховано' in self.last_problem_state:
return f'''Последняя задача "{self.last_problem_name}" пройдена на 100%'''
elif 'Частково зараховано' in self.last_problem_state:
self.last_problem_percent = int((self.last_problem_state.split()[-1])[:-1])
return f'''Последняя задача "{self.last_problem_name}" пройдена на {self.last_problem_percent}%'''
if '%' in self.last_problem_state:
self.last_problem_percent = int((self.last_problem_state.split()[-1])[:-1])
return f'''Последняя задача "{self.last_problem_name}" пройдена на {self.last_problem_percent}%'''
else:
return f'''Последняя задача "{self.last_problem_name}" пройдена на 0%'''
elif 'Помилка компіляції' in self.last_problem_state:
return f'''Последняя задача "{self.last_problem_name}" была не пройдена из-за ошибки компиляции'''
else:
return 'Произошли технические шоколадки при поиске последнего решения'

Expand Down

0 comments on commit fe676c6

Please sign in to comment.