Advertisement
eNeRGy90

Untitled

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