Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Exercise:
- def __init__(self, topic, course_name, judge_contest_link, problems):
- self.topic = topic
- self.course_name = course_name
- self.judge_contest_link = judge_contest_link
- self.problems = problems
- list_objects = []
- exersices = input().split(" -> ")
- while not exersices[0] == 'go go go':
- problems_list = exersices[-1].split(', ')
- object = Exercise(exersices[0], exersices[1],exersices[2], problems_list)
- list_objects.append(object)
- exersices = input().split(" -> ")
- for excercise in list_objects:
- print(f"Exercises: {excercise.topic}")
- print(f'Problems for exercises and homework for the "{excercise.course_name}" course @ SoftUni.')
- print(f'Check your solutions here: {excercise.judge_contest_link}')
- counter = 1
- for problem in excercise.problems:
- print(f'{counter}. {problem}')
- counter +=1
Add Comment
Please, Sign In to add comment