Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion group.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
"""An example of how to represent a group of acquaintances in Python."""

# use dictionaries
# use lists

#person keys: name, age, job, connections to others


#Jill is 26, a biologist and she is Zalika's friend and John's partner.
#Zalika is 28, an artist, and Jill's friend
#John is 27, a writer, and Jill's partner.
#Nash is 34, a chef, John's cousin and Zalika's landlord.

#should allow people to have no job
#should allow people to have no connections
#reciprocal connections?

# Your code to go here...

my_group =
my_group = {
'Jill': {
'age': 26,
'job': 'biologist',
'connections': {
'Zalika': 'friend',
'John': 'partner',
}
},

'Zalika': {
'age': 28,
'job': 'artist',
'connections': {
'Jill': 'friend'
}
},

'John': {
'age': 27,
'job': 'writer',
'connections': {
'Jill': 'partner',
'Nash': 'cousin'
}
},

'Nash': {
'age': 34,
'job': 'chef',
'connections': {
'John': 'cousin',
'Zalika': 'landord'
}
}
}