logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Henry SimmonsEnglish
(5/5)

919 Answers

Hire Me
expert
AbdulrazzakEngineering
(/5)

726 Answers

Hire Me
expert
Julian RichardsonComputer science
(5/5)

533 Answers

Hire Me
expert
Bhupesh SinglaComputer science
(5/5)

506 Answers

Hire Me
Others
(5/5)

You must use the word file with code in it and build off of this code.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Application shell for menu driven app

import sys

import pandas_datareader as pdr

from time import time, sleep

def display_menu():

    print(

        """   

         StockTracker Menu    

         1. Track Watchlist    

         2. Add Watchlist     

         3. Edit Watchlist    

         4. Delete Watchlist    

         5. Exit           

         """

    )

def track(watchlist):

    start_time = time()

    while True:

        print(pdr.get_quote_yahoo(watchlist)['price'])

        elapsed = time() - start_time

        if elapsed >= 10:

            prompt = input("Would you like to continue? y/n: ")

            if prompt == 'n':

                break

            start_time = time()

            elapsed = 0

            sleep(1)

def add_list():

    symbols = []

    symbol = input("Enter a stock symbol: ")

    while symbol != '':

        if symbol not in symbols:

            symbols.append(symbol.upper())

        symbol = input("Enter a stock symbol: ")

    return sorted(symbols)

def edit_list():

    pass

def delete_list():

    pass

# actions = {'1' : track, '2' : add_list, '3' : delete_list, '4' : edit_list}

def main():

    while True:

        display_menu()

        choice = input("Enter your choice: ")

        if choice == '1':

            track(watchlist)

        elif choice == '2':

            watchlist = add_list()

        elif choice == '3':

            watchlist = edit_list()

        elif choice == '4':

            watchlist = delete_list()

        elif choice == '5':

            print("Thank you for using stonktracker!")

            sys.exit(0)

        else:

            print("Please make a valid choice")

if __name__ == "__main__":

    main()

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme