Successfully download Anaconda and Jupyter lab onto your computer Please choose 4 different types of objects (ie int, float, list, str, dict etc), create them in Python, and have Python tell you the...

1 answer below »
  • Successfully download Anaconda and Jupyter lab onto your computer
  • Please choose 4 different types of objects (ie int, float, list, str, dict etc), create them in Python, and have Python tell you the type of object it is
  • Create a list of stocks (called yourname_stocks) with their current prices OR a list of sector ETFs with their current prices (minimum number of stocks/ETFs in the list is 10). Your list should contain tuples.

Jay_stocks = [(‘tsla’, 800), (‘ge’,11), (‘cgc’,40), (‘crm’, 232)]

Please print() after each one of the following:

  • Please return the following in Jupyter Lab:
    1. The seconditemin your list [ ]
    2. The third through 5thitems
    3. All items up to the 4thitem
    4. The last item
  • Please change (ie overwrite) an item from your list
  • Please append a new item to the end of your list
  • Please delete an item from your list
  • Please add a new item to the third position in your list
  • Please sorted your list
  • Please use Python to:
    1. Create a new list called firstname_portfolio (put your first name in where it says firstname)
      1. add a list of 7 possible stocks you will invest in
    2. If given $1mm dollars to invest please:
      1. Think about how much you want to invest in each stock and use some Python math code to calculate the number of shares for 3 of your holdings

XXXXXXXXXXPART 2 --------------------

Please create and return the following:

  • Please write the code in python in order to bring back market caps for your 5-stock portfolio. Your list should have the tickers and current market caps.
    1. Create a stock list with 5 pairs of stocks and their market caps (ie =shares * share price = market cap = equity value)
    2. Create a variable (ticker) that asks for the users input
    3. Use a for loop and an f string that returns a statement showing the current market cap for the ticker the user asked for
    4. Make sure to embed an if statement in the for loop so that python (while looping through your list) brings back the right metric IF it matches the users ticker
      1. The if statement should have an f string that tells the use ‘the market cap for your ticker is $mm’
  • Using the same list from above, use a for loop and an if statement showing that the following based on the market cap:
  1. Make sure in the market cap list has a name with a market cap
  2. Assign a variable in order for the user to choose which ticker they want to python to return
  3. Make sure to use a for loop with an embedded if statement to 1) loop through your stock list and 2) apply conditional statements based on the i, ii, iii above
  4. In your if statement you can apply a Compound statement –ie an AND statement—in other words “if this AND that then do . . . .”
Answered Same DayApr 08, 2022

Solution

Salony answered on Apr 08 2022
11 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here