Need help to understand not the answer

Piet van Oostrum piet-l at vanoostrum.org
Sat Jul 29 15:44:42 EDT 2017


new_to_c0ding <devinderaujla at gmail.com> writes:

> Now as per instructions, class MITCampus(Campus) has  (self, center_loc, tent_loc = Location(0,0)) and it is mentioned that center_loc and tent_loc are Location objects but when I code them as Locations, I get error from the tester:
> Traceback (most recent call last):
>   File "submission.py", line 61, in __init__
>     self.cloc=Location(center_loc)
> TypeError: __init__() missing 1 required positional argument: 'y'

Location must be called with 2 parameters: a x and a y coordinate, not
with another location as parameter.
-- 
Piet van Oostrum <piet-l at vanoostrum.org>
WWW: http://piet.vanoostrum.org/
PGP key: [8DAE142BE17999C4]



More information about the Python-list mailing list