Advertisement
eNeRGy90

Untitled

Feb 8th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 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. while True:
  11.     text = input()
  12.     if text == "go go go":
  13.         break
  14.  
  15.     v = text.split(" -> ")
  16.  
  17.     exercise = Exercise(v[0], v[1], v[2], v[3].split(", "))
  18.     collection.append(exercise)
  19.     print(f"Exercises: {exercise.topic}")
  20.     print(f'Problems for exercises and homework for the "{exercise.course_name}" course @ SoftUni.')
  21.     print(f"Check your solutions here: {exercise.judge_link}")
  22.  
  23.     for i in range(len(exercise.problems)):
  24.         print(f"{i+1}. {exercise.problems[i]}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement