Answered step by step
Verified Expert Solution
Question
1 Approved Answer
First ToDo Data Structure: When creating a more complex data structure it is best to start with one ( maybe two ) record to avoid
First ToDo Data Structure:
When creating a more complex data structure it is best to start with one maybe two record
to avoid adding a ton of code that may change. Once you test and are satisfied more records
can be added. We want a dictionary to hold a key and another dictionary. Lets start with
the inner dictionary that would pair keys Name, C and S with their values from the test data:
Dictionary uses braces and key: value pairs comma separated.
Pin: Name: Elva LinC: S:
Above would be a dictionary holding name, checking, and savings account values.
The next step is to pair that dictionary as a value with a key that will be the customers pin
and make that a dictionary. See the inner dictionary from above is highlighted:
Key : Value
selin : Pin: Name: Elva LinC: S:
Store your newly created dictionary in a name called accounts. Make sure we have two
customers info in the accounts dictionary, with one has your asurite as the Key.
Make sure the variable account is not used. Before you comment out account it will be
easier to rename all instances of that name in your code to accounts. Do this by clicking on
account and wait till PyCharm highlights account. RightClick and select Refactor
Rename. Change to accounts and click Refactor.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started