Tell us what’s happening:
Could you please help me? I’m stuck. I tried testing ‘Projectile(12, 12, 12)’, and it worked, but my code didn’t accept it. I always get the failed message:
'Sorry, your code does not pass. Don’t give up.
The instance Projectile(12, 12, 12) should have a representation equal to ‘Projectile(12, 12, 12)’.
What could be wrong with my code?
Your code so far
# User Editable Region
def __repr__(self):
return f"'Projectile({self.speed}, {self.height}, {self.angle})'"
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Challenge Information:
Learn Encapsulation by Building a Projectile Trajectory Calculator - Step 12