Advertisement
eNeRGy90

Untitled

Feb 9th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. class Exercise:
  2.     def __init__(self, topic, course_name, judge_link, problems):
  3.         self.topic = topic
  4.         self.course_name = course_name
  5.         self.judge_link = judge_link
  6.         self.problems = problems
  7.  
  8.  
  9. collection = []
  10. text = input()
  11. while text != "go go go":
  12.     v = text.split(" -> ")
  13.     collection.append(Exercise(v[0], v[1], v[2], v[3].split(", ")))
  14.     text = input()
  15. for item in collection:
  16.     print(f"Exercises: {item.topic}")
  17.     print(f'Problems for exercises and homework for the "{item.course_name}" course @ SoftUni.')
  18.     print(f"Check your solutions here: {item.judge_link}")
  19.     [print(f"{a}. {problem}") for a, problem in enumerate(item.problems, 1)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement