Python Forum
another positional argument error (...and executing objects stored in a list)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
another positional argument error (...and executing objects stored in a list)
#4
I'm not sure if this is the issue, but when you create the Circle or Rectangle classes, you store the details of the shape in various values: self.__startX, self.startY, and so on. But then when you draw them, you require the values to be passed to the draw method as parameters. I would just use the values you already stored. So line 22 of the rectangle class is turtle.goto(__startX, __startY). I would remove __startX and __startY from the parameter list of draw, and instead use turtle.goto(self.__startX, self.__startY). Then do the same for all of the other variables used in the draw method.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: another positional argument error (...and executing objects stored in a list) - by ichabod801 - Nov-16-2018, 04:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: __init__() missing 1 required positional argument: 'successor siki 1 4,374 Mar-08-2021, 02:05 PM
Last Post: Larz60+
  Missing 1 required positional argument in python code edwinostby 7 10,173 Jan-19-2021, 12:52 PM
Last Post: Serafim
  Missing positional arguments error?? hhydration 2 2,205 Oct-01-2020, 05:33 AM
Last Post: buran
  List of Objects print <__main. Problem Kol789 10 3,635 Jul-21-2020, 09:37 AM
Last Post: DeaD_EyE
  missing positional argument error programmert 1 2,875 Oct-18-2019, 11:05 AM
Last Post: Larz60+
  missing 1 required positional argument jedmond2 4 6,857 Sep-19-2019, 12:00 PM
Last Post: jefsummers
  missing 1 required positional argument mcgrim 10 19,991 May-07-2019, 09:02 PM
Last Post: Yoriz
  sorting a deck of cards (objects in a list) itmustbebunnies 1 7,290 Dec-05-2018, 02:44 AM
Last Post: ichabod801
  TypeError: method missing 1 positional argument koolinka 4 5,145 Nov-18-2018, 04:53 PM
Last Post: ichabod801
  Class positional argument error itmustbebunnies 2 3,054 Nov-07-2018, 11:09 AM
Last Post: stullis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020