Live data from Hacker News

Show HN: My 70 year old grandma is learning to code and made a word game

grandmasword.com

21–30 of 160 posts

Re: Show HN: My 70 year old grandma is learning to code and made a word game

#21
time to LLM a binary search

  import requests
  url = 'https://grandmasword.com/dictionary.js'
  response = requests.get(url)
  lines = response.text.split('\n')[2:]
  exec('\n'.join(lines))
  def binary_search(dictionary):
    while len(dictionary) > 1:
        mid_index = len(dictionary) // 2
        mid_word = dictionary[mid_index]
        print(f"Guess this middle word: {mid_word}")
        user_input = input("Did grandma say her word is before or after? (type b or a)").strip().lower()
        dictionary = dictionary[:mid_index] if user_input == "b" else dictionary[mid_index + 1:]
    print(f"Grannys word: {dictionary[0]}" if dictionary else "No words left in the dictionary.")
  binary_search(dictionary)
Solved in 18 guesses! Share score Thank you for visiting my website. There'll be a new word everyday just like Wordle. Kind regards, Eleanor

Re: Show HN: My 70 year old grandma is learning to code and made a word game

#25
post #8

Earlier quoted context omitted.

Is it always the same word? My word is between Vodka and Vomit :D

It’s like wordle: different word every day and everyone gets it. At least that’s what the text says once you get it.

At least for the next 13 days, when gma will learn about null pointers

Re: Show HN: My 70 year old grandma is learning to code and made a word game

#29
post #10
post #6

It doesn’t work on phone, sigh

Looks like the developer is aware there may be limitations. > Hopefully a new version will be released free of charge for current customers.

Oh, there is a readable JavaScript inside!
Post reply on HN