Mad Libs: Difference between revisions
Content added Content deleted
(Made more functional) |
(Fixed Mathematica) |
||
Line 1,083: | Line 1,083: | ||
InputString["Enter the filename of the story template:"]]; |
InputString["Enter the filename of the story template:"]]; |
||
answers = |
answers = |
||
AssociationMap[ |
|||
InputString[ |
InputString[ |
||
"Enter a" <> |
"Enter a" <> |
||
If[StringMatchQ[# |
If[StringMatchQ[#, |
||
" |
"<" ~~ Alternatives @@ Characters["aeiou"] ~~ ___], "n", ""] <> |
||
StringTrim[ |
" " <> StringTrim[#, "<" | ">"] <> ":"] &, |
||
⚫ | |||
"<" | ">"]; |
|||
Print[StringReplace[text, Normal[answers]]];</lang> |
|||
Print[ToString[ |
|||
StringForm @@ |
|||
Prepend[answers, |
|||
⚫ | |||
{{out}} |
{{out}} |
||
<pre>George went for a walk in the park. he |
<pre>George went for a walk in the park. he |