Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mad Libs Program
#3
A lot of this depends on how you structure the story files and how you signal you need a word (and what type). One method, since you control the story text, would be to have a key character that identifies that a word is needed, followed by the type of word. You can then pick up that word type and ask verbatim for that to be entered, after which you substitute that word in the string. For example, you could use the pipe as your signal character. A sentence in the story could be "I thought I saw a |noun , but it turned out to be a |adjective |noun ." Your program would look for pipes (|), take the next word and use it as the prompt, then substitute the entry for the pipe and word. All types of words would then be treated the same.

Just a thought.
Reply


Messages In This Thread
Mad Libs Program - by theguywithcurls - Nov-13-2019, 04:41 PM
RE: Mad Libs Program - by micseydel - Nov-14-2019, 12:04 AM
RE: Mad Libs Program - by jefsummers - Nov-14-2019, 02:31 AM
RE: Mad Libs Program - by micseydel - Nov-14-2019, 05:10 PM
RE: Mad Libs Program - by theguywithcurls - Nov-15-2019, 04:20 AM
RE: Mad Libs Program - by jefsummers - Nov-15-2019, 12:37 PM
RE: Mad Libs Program - by micseydel - Nov-15-2019, 09:26 PM
RE: Mad Libs Program - by theguywithcurls - Nov-15-2019, 11:43 PM
RE: Mad Libs Program - by micseydel - Nov-16-2019, 12:07 AM
RE: Mad Libs Program - by theguywithcurls - Nov-16-2019, 07:38 PM
RE: Mad Libs Program - by theguywithcurls - Nov-17-2019, 12:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Running 3rd party libs on Steam Deck (Arch Linux) with restricted access metulburr 0 3,357 Jan-07-2023, 10:41 PM
Last Post: metulburr
  How can I use CRC libs in python? blodht 0 2,705 Feb-03-2020, 10:26 PM
Last Post: blodht
  using py32, just need py64 LIBS for now, how to install? davecotter 1 2,837 Jan-29-2019, 10:40 PM
Last Post: davecotter
  [split] adding 3rd party libs Blue Dog 7 8,433 Oct-22-2016, 12:03 PM
Last Post: Blue Dog

Forum Jump:

User Panel Messages

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