Skip to content

Commit

Permalink
add more explanations to better describe the task
Browse files Browse the repository at this point in the history
  • Loading branch information
loayshaqir1 committed Oct 22, 2023
1 parent 30806e2 commit 96620f5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions nbs/sample_question.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@
"source": [
"After familiarizing yourself with the syntax of rgxlog, <br>\n",
"let's explore another example that highlights the power of this declarative language. <br>\n",
"given a story.txt file which contains in between its lines parent-child information, the information is provided as follows:\n",
"X is the parent/father of Y\n",
"Y is the child/daughter of X\n",
"given a story.txt file which contains in between its lines parent-child information, the information is provided as follows: <br>\n",
"1- X is the parent/father of Y <br>\n",
"2- Y is the child/daughter of X\n",
"\n",
"The story also has some last names.\n",
"The task is to identify the last name of all individuals.\n",
"It's important to note that you don't have access to individual last names, but you can deduce them by constructing family trees based on the information provided in the story.\n",
"\n",
"Take a couple of minutes to think a solution for this problem.\n",
"Here is the first line of the story as an example:\n",
"```plaintext\n",
"Once upon a time, there was a little girl named Aria Walker. Aria is the daughter of Owen.\n",
"```\n",
"What you should deduce from this line is that Owen is the parent of Aria as it matches the first template of provided information (Y is the daughter of X), <br>\n",
"and since Aria's name was given along with her lastname, <br>\n",
"you should also conclude that Owen's last name is also Walker.\n",
"\n",
"Take a couple of minutes to think a solution for this problem.\n",
"---\n",
"\n",
"Now that you understand the complexity of deducing last names based on family trees when using Python and extracting the parent-child relationships using Python, <br>\n",
"Now that you understand the complexity of deducing last names based on family trees and extracting the parent-child relationships using Python, <br>\n",
"let us show you how easily we can do that by incorporating rgxlog into the equation.\n"
]
},
Expand Down

0 comments on commit 96620f5

Please sign in to comment.