March 2022 0 12 Report
Programowanie z Pythonem-Zadanie 4 Given a dictionary called stocks that contains both stock tickers and the corresponding stock prices, write code that prints out the formatted information in the table.

Expected output:
-----------------------
TICKER PRICE (USD)
-----------------------
AAPL 165.30
MSFT 330.59
FB 324.46
AMZN 3507.07
TSLA 1144.76
GOOGL 2837.95

stocks = {
'AAPL': 165.30,
'MSFT': 330.59,
'FB': 324.46,
'AMZN': 3507.07,
'TSLA': 1144.76,
'GOOGL': 2837.95
}

Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.