79605668

Date: 2025-05-04 13:48:13
Score: 2.5
Natty:
Report link

How can I make both row and col coordinates to be the size of the window?

Does this help?

Snippet:

    def coordinate(self, row, col):
        """
        Gets the coordinates of a certain block.
        """
        
        if row < 1 or row > self.blocky or col < 1 or col > self.blockx:
            raise ValueError("Both the row and the column must fall inside the acceptable range.")

        x = col * (self.width / self.blockx)
        y = row * (self.height / self.blocky)

        print(f"Coordinates for block ({row}, {col}): ({x}, {y})")
        return x, y
Reasons:
  • Blacklisted phrase (0.5): How can I
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): How can I
  • Low reputation (0.5):
Posted by: Adios Gringo