Python please: Three fictional companies have the following value per stock share: Gaggle: $212.41 Lotus: $150.25 PennyStocksRUs: $0.84 Write a program to read the number of stock shares owned per company, and output the total dollar value of all owned stock shares. NOTE: Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print(f'Share Portfolio Value: ${portfolio_value:.2f}') For example, if the input is 10 15 20 where 10 is the number of shares of Gaggle, 15 is the number of shares of Lotus, and 20 is the number of shares of PennyStocksRUs; the output is Share Portfolio Value: $4394.65 For this exercise, assume all input values are nonnegative. Input to program

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 5PP
icon
Related questions
Question

Python please:

Three fictional companies have the following value per stock share:

Gaggle: $212.41 Lotus: $150.25 PennyStocksRUs: $0.84

Write a program to read the number of stock shares owned per company, and output the total dollar value of all owned stock shares.

NOTE: Output each floating-point value with two digits after the decimal point, which can be achieved as follows:

print(f'Share Portfolio Value: ${portfolio_value:.2f}')

For example, if the input is

10 15 20

where 10 is the number of shares of Gaggle, 15 is the number of shares of Lotus, and 20 is the number of shares of PennyStocksRUs; the output is

Share Portfolio Value: $4394.65

For this exercise, assume all input values are nonnegative.

Input to program
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage