Quando tento dar 'Run' no codigo, so sai esse erro:
Traceback (most recent call last): File "C:/Users/Sousa/PycharmProjects/python3oo2/models.py", line 2, in class Movie: File "C:/Users/Sousa/PycharmProjects/python3oo2/models.py", line 9, in Movie Avengers = Movie('Avengers - Finity Wars', 2018, 160) NameError: name 'Movie' is not defined
class Movie:
def __init__(self, name, year, duration):
self.name = name
self.year = year
self.duration = duration
Avengers = Movie('Avengers - Finity Wars', 2018, 160)
print(Avengers)
Como resolver? Obrigado!