Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 : Creating a person Write a function called create _ person ( person _ description ) that creates a 5 element list from

Question 1: Creating a person
Write a function called create_person (person_description) that creates a 5 element list from a string, where the first
element is a unique id number, second element is the person's name (which is itself a list), the third element is their sex (assume
possible values of male and female), the fourth element is their age, and the fifth element is a list of unique id numbers as a
placeholder for children, which will initially be empty (more about this soon in question 3).
For example:[100,['Justin', 'Smith'], 'male', 32,[]][101,['Justine','Smith'], 'female', 33,[]][102,['James','Smith'], 'male', 4,[]][103,['Jane','Smith'], 'female', 6,[]]
You may assume that only names are capitalized, and that the only numbers that are used in these sentences are for someone's age.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

Students also viewed these Databases questions

Question

d. How will lack of trust be handled?

Answered: 1 week ago