forked from Akuli/python-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassrough.py
More file actions
46 lines (25 loc) · 814 Bytes
/
classrough.py
File metadata and controls
46 lines (25 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Movie:
def __init__(self, title, hero, heroin):
self.title=title
self.hero=hero
self.heroin=heroin
def info(self):
print('Movie name :', self.title)
print('Movie hero :', self.hero)
print('Movie heroin:', self.heroin)
list_of_movies = []
while True:
title = input('Enter movie name:')
hero = input('Enter hero name')
heroin = input('Enetr heroin name')
m = Movie(title,hero,heroin)
list_of_movies.append(m)
print("Movie added to the list successfully")
option = input("Do you want to add one more movie details [yes|No]")
if option.lower() == 'no':
break
print ("All movies information")
print ('#' * 40)
for movie in list_of_movies:
movie.info()
print()