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
What is one reason why a business may want to move entirely online?
Sidana [21]

Answer:

The correct answer is C. One reason why a business may want to move entirely online is to focus on a global market.

Explanation:

The fact that a business wishes to move entirely towards the online sales modality implies that there is a desire to expand the possibilities of selling its products beyond the physical place where it has its store.

It is a reality that starting an online business implies that the offered product can be purchased anywhere in the world, thanks to advances in technology and transportation that allow the product to be purchased and delivered in a matter of days, thanks to the advances produced by globalization.

Therefore, the fact that the store goes from physically to online selling makes its potential customers go from being the ones who know the store and live close to it to everyone in the world with access to internet.

3 0
2 years ago
if someone has become very attached to their mobile device and feels anxious if the cannot connect to the internet, what are the
svp [43]

Answer:

Anxiety

Explanation:

trust I have it

4 0
2 years ago
What is a new ransomware program that encrypts your personal files and demands payment for the files' decryption keys? Multiple
frosja888 [35]

Answer: Simple-locker

Explanation:Simple-locker is the program that works on the technique in which it automatically encrypts the data or files and then demand a certain ransom or money from the user for the decryption of that data. It works on the function to gain the ransom or incentive in the financial form.

The decryption can only be carried out in safe way when the victim has the key to decrypted data or file.

5 0
3 years ago
Does anyone know edhesive 4.3 question 1
navik [9.2K]

No

.................................. :)

5 0
2 years ago
Read 2 more answers
Paul is a baker who wants to improve his recipe for muffins because they turn out with a greasy flavor. What ingredient should h
Sergio039 [100]
Butter to Margarine

Cakes baked with butter usually always turns out to be greasy and heavy.

Hope this helps, good luck! (:
3 0
3 years ago
Read 2 more answers
Other questions:
  • How could you fact check a news report that you saw on television
    12·1 answer
  • System uses a 6-bit 2’s complement signed integer representation. What is the range of decimal values it can represent?
    14·1 answer
  • The Active Directory Users and Computers tool can be used to:______.
    11·1 answer
  • What is a Slide Master? A. the placeholder used to insert objects B. the sequence of slides in a presentation C. the default des
    14·1 answer
  • What error occurs in the following program? #include using namespace std; int main() { int number1, number2, sum; cout <<
    13·1 answer
  • User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all that apply)
    10·2 answers
  • 8.Which of the following IC was used in third generation of computers?Immersive Reader
    13·1 answer
  • An Excel file that contains one or more worksheets
    15·1 answer
  • Released in 1976, the Apple I was Apple Computer's first product.<br><br> O True<br> O False
    6·1 answer
  • External hard drives typically connect to a computer via an external port (such as a usb or ____ port) or a wireless connection.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!