write code to assign x and y coordinates to currcoord, and store currcoord in locations. input first receives an x value, then a y value. input example: 12 32 88 2 -1 -1

Respuesta :

It will be feasible to create a coordinate code that looks like this using the knowledge of the Python computational language:

Writing coordinate code in python:

 def __init__(self, x, y):

        self.x = x

        self.y = y

  def getX(self):  

    directly

         return self.x

  def getY(self):

    return self.y

 def __str__(self):

      return '<' + str(self.getX()) + ',' + str(self.getY()) + '>'

class Coordinate(object):

  def __init__(self,x,y):

      self.x = x

      self.y = y

  def getX(self):

     return self.x

  def getY(self):

      return self.y

  def __str__(self):

     return '<' + str(self.getX()) + ',' + str(self.getY()) + '>'

    def __eq__(self, other):            

      if other.x == self.x and other.y == self.y:

          return True

      else:

          return False

  def __repr__(self):

      return "Coordinate"+ str((self.x, self.y))

Learn more about python codes here;

https://brainly.com/question/27818319

#SPJ4