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]
4 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]4 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
The tiny memory cards used by digital cameras and mobile devices are an example of ____ storage.
Shalnov [3]
<span>The tiny memory cards used by digital cameras and mobile devices are an example of Solid State storage.</span>
5 0
4 years ago
Match the limits of the user with an appropriate design response. 1. severe arthritis, unable to type or use a mouse on a reliab
ololo11 [35]
Idk........................
4 0
3 years ago
All the answers I've got is 0, which seems strange but I'm sure I'm following this algorithm correctly.
Salsk061 [2.6K]
I think its six. im not sure but it could be another on.                                                                     

7 0
4 years ago
What is best android apps​
natima [27]

Answer:

brainly

Explanation:

cuz yeah its the best app ever tbh

8 0
3 years ago
Read 2 more answers
Evan is borrowing a friend's laptop to check out some groovy music files. What can Evan look for to quickly identify
Yuki888 [10]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct option for this question is the file extension. Because, by knowing the file extension, you can easily understand and know what the file is. If Evan checking out some groovy music files then he will definitely look at the file format to know that is it the music file or not.

Other options are not correct because:

messaging app function is to send the message, receive and store the message while hardware does not have any relation to identifying the music file and system software is an example of an operating system that also does not help the Evan for looking at music file on the laptop.

7 0
3 years ago
Other questions:
  • Information Can Be Gathered Regarding The Temperature Of A Substance And Uploaded To A Computer Using A ___________ As A Data Co
    6·1 answer
  • Which Internet appliance can take action to potentially stop a network attack from taking place?
    6·1 answer
  • Extended ACLs can filter traffic based on _____. (Points : 3) protocol type
    8·1 answer
  • The bearing of point p from A​
    15·1 answer
  • 1.6.M - Assignment: Understanding If Else Statements in Python
    7·1 answer
  • To use a macro, a user must first <br> ____ a macro and then <br> ____the macro.
    8·1 answer
  • Name the written test a potential driver must pass and list the minimum required score to earn a learner’s license.
    8·2 answers
  • 2.cite at least 2 example on how multimedia facilitates learning​
    6·1 answer
  • What type of hard drive has no moving parts making it fast and durable
    15·1 answer
  • The Cisco ____ model does not describe how communications take place. Rather, it focuses on how best to design a network, especi
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!