Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction Data manipulation forms the basis of all programming. This is especially important when working with data structures. For this week's homework assignment you will

Introduction
Data manipulation forms the basis of all programming. This is especially important when working with data structures. For this week's homework
assignment you will be tasked to work with lists and dictionaries to create a (very simple) portfolio. Below is a list of tasks you are expected to complete
when working with lists and dictionaries
Expectations
For this assignment you are expected to create a program that does the following:
Declare a list that contains stocks a user holds in their portfolio. The portfolio must contain at least 5 items
Report a range of items in that portfolio. Print out the index of each holding in this range
Insert a new holding into the portfolio
Remove a stock from the portfolio
Create a dictionary where the value of each key is the amount of shares held for that stock
Add a new stock to the dictionary and a number of shares associated with that holding
Calculate the total number of shares held in the portfoliol
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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions