Answered step by step
Verified Expert Solution
Link Copied!

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: 9999,Name: Elva Lin,C: 1.00,S: 25.50}
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 }
{selin2 : {Pin: 9999,Name: Elva Lin,C: 1.00,S: 25.50}}
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.
1.1 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. Right-Click and select Refactor >
Rename. Change to accounts and click Refactor.

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

LO1 Understand human resource management and define human capital.

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago