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
Examine the evolution of the World Wide Web (WWW) in terms of the need for a general-purpose markup language. Provide your persp
creativ13 [48]

WWW is used to browse for view the webpage basically content is normally displayed as HTML pages.

In any browser's webpage irrespective of language been used output content display as HTML pages only.

<u>Explanation:</u>

  • In other methods is used XML format where it is opened and closed tag for every word editing XML file is very useful.
  • XML tools are ready is available where end-user can edit or create by for example notepad++ extra
  • It is a language designed to store the data in a specific format and easily process and used by a coding language or web pages.
4 0
3 years ago
________ are used in input, processing, and output operations that can help create more efficient programs as the data can be pr
lapo4ka [179]
Functional requirements <span>are used in input, processing, and output operations that can help create more efficient programs as the data can be processed many times without having to be input again.
</span>The functional requirements define function/s of a system or its component. It <span>describes what a software system should do.</span>
8 0
3 years ago
Let's say that you handle the IT systems administration for your company. There's a server inside of your organization that chec
kirill115 [55]

From server do some file transfer to client PC to sync to the server.

<u>Explanation:</u>

As IT System administrator if PC or client or workstation or laptop not connected to network more than 3 months from windows server we need to refresh the connection and redo the connection from server to the client to do sync the activities.

Moreover from domain server refresh and re sync activities to establishing the connection.

Go to client PC or workstation or desktop login log and logout from the PC and login to domain account by changing the password.

7 0
3 years ago
What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout &lt;&lt;
Leno4ka [110]

Answer:

The code will display the following on the screen:-

2

0

2

Explanation:

The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.

8 0
2 years ago
Is a bottle opener considered an engineered item?
KIM [24]
Yes actually it is it’s a machine to use for opening bottles such as cans n other
3 0
3 years ago
Other questions:
  • PLS HELP ASAP! WILL GIVE BRAINLIEST!
    14·1 answer
  • Write a program to input money in cents from user, example 12745 and display the one dollar bills and the cents. Submit source c
    12·1 answer
  • The counter variable in the code below increments by 1 each time through the loop. What will the value of counter be after the f
    11·1 answer
  • Write a function chat accepts a pointer to a C-string as its argument. The function should count the number of vowels appearing
    5·1 answer
  • Networks that are designed to connect similar computers that share data and software with each other are called:
    10·1 answer
  • i need to also do a algorithm where if the total is a even number 10 points are added to the score and if the total is odd then
    11·1 answer
  • python Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value i
    7·1 answer
  • Danica is creating a flyer for her cookies that she will sell during her school fair. She wants to add a registered
    7·1 answer
  • The _______ within a story are the people and/or objects that the story is about
    5·2 answers
  • ¿Qué ayuda nos proporcionan las herramientas tecnológicas en estos tiempo de pandemia? ayudaaaaa plis
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!