1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Jobisdone [24]
3 years ago
9

Write an expression to print each price in stock_prices. Sample output with inputs: 34.62 76.30 85.05

Computers and Technology
1 answer:
Lana71 [14]3 years ago
4 0

Answer:

Here is the Python program:

stock_prices = input().split() #to take input and splits it into a list

for price in stock_prices: #iterates through stock_prices

   print("$",price) #prints each value of stock_prices with a dollar sign

Explanation:

The program is well explained in the attached comments. I will explain the logic of the program with the help of an example:

Suppose the user enters the following input as stock_prices values

34.62 76.30 85.05

input() method is used to take input from user

split() method is used to split or break this input string and returns a list of strings as:

['34.62', '76.30', '85.05']    

Now the statement for price in stock_prices: iterates through each item of the list and print("$",price) prints each value of list with a dollar sign on the output screen as:

$ 34.62                                                                                                            

$ 76.30                                                                                                            

$ 85.05    

You might be interested in
( ABOVE TRUSTED HELPER ONLY)Why does my rank say that I have one
prohojiy [21]
That’s a really good question but that means something is wrong with it refresh your screen or close the page app
6 0
3 years ago
Read 2 more answers
Which of the following job duties would a software developer perform?
juin [17]

<u>The most important job duty of a software developer is to develop a product/program that is easy to use and melts a customer’s need.</u>

<u></u>

Explanation:

Some other duties of  a Software developer are

  • Researching,designing and implementing new software program's and then managing them
  • Testing and evaluating the developed software program's
  • Identifying errors in the existing program's and modifying the same
  • Writing effective codes
  • employing various software tools
  • Training new users
  • Working closely with the other developers

8 0
3 years ago
Which of the following are characteristics of conditional formatting? Choose all that apply.
Leona [35]
Formatting that is selected for each cell individually related to a specific condition
8 0
3 years ago
Read 2 more answers
Suppose you create a class Square to be a subclass of GeometricObject. Analyze the following code:
Lemur [1.5K]

Answer:

B. The program has a compile error because you attempted to invoke the GeometricObject class's constructor illegally.

Explanation:

To call a superclass constructor, the user must use super(). This is necessary unless default constructors are used. Also, it is vital to make sure if their are appropriate argument to be used while invoking the superclass constructor.

3 0
3 years ago
What is the significance of XML tags?
tatyana61 [14]

Answer:

your answer would be to ur question would be B

7 0
3 years ago
Other questions:
  • Janeal spends her day looking at the stock and bond markets and evaluating how the portfolios of the businesses she serves will
    5·1 answer
  • Queue is the LIFO structure.<br><br> o True<br><br> o False
    8·1 answer
  • You have been contracted by a local school to evaluate their computer labs for security threats. They are most worried about the
    6·1 answer
  • Tim has an old server computer that his company uses as a backup. One of the hard drives has gone bad and needs to be replaced.
    13·1 answer
  • This is an electronic method used to send and receive data–voice, text, images, and video.
    13·2 answers
  • BUURTAIS
    7·1 answer
  • Which of the following ""invisible"" marks represents an inserted tab?
    10·1 answer
  • Anyone on ps4 willing to trade me a fennec or McClaren on rocket league?
    6·2 answers
  • Advantages of using Unicode to represent data
    8·1 answer
  • Compare and discuss between electromechanical and electronic era of computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!