[ot][spam][crazy][crazy][spam]

Karl Semich 0xloem at gmail.com
Wed May 25 01:58:04 PDT 2022


import operator, time

class TinySuccessfulGoal:
  def __init__(self, start_value):
    self.value = start_value
  def meet_goal(self, value):
    print(f"i can totally make {self.value} be {value}!")
    while self.value != value:
      if self.value + 1 < value:
        print(f"Seems small. Maybe making it bigger?")
        self.do(operator.add, 1)
      elif self.value - 1 > value:
        print(f"Maybe too big. Could try making smaller?")
        self.do(operator.sub, 1)
      else:
        print(f"This seems really close. Maybe just a nudge!")
        self.do(operator.add, value - self.value)

      print(f"I'm at {self.value}!")
    print("I met the goal!")
  def do(self, operator, operand):
    self.value = operator(self.value, operand)
    time.sleep(0.2)

if __name__ == '__main__':
  TinySuccessfulGoal(3).meet_goal(7)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/html
Size: 1550 bytes
Desc: not available
URL: <https://lists.cpunks.org/pipermail/cypherpunks/attachments/20220525/709be583/attachment.txt>


More information about the cypherpunks mailing list