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
MakcuM [25]
3 years ago
5

Using only the sequential operations described in Section 2.2.2, write an algorithm that gets two values: the price for item A a

nd the quantity purchased. The algorithm should then print the total cost and the total cost plus an 8% sales tax.
Engineering
1 answer:
suter [353]3 years ago
7 0

Answer:

total_cost = cost + tax

Explanation:

Step1) Let the 2 variable for take input from user e.g price and quantity

var price ;

var quantity ;

var cost ;

var tax ;

var total_cost ;

Step2) take input from user quantity of item 'A'

step3) cost = price * quantity

Step4) tax = 0.08 * cost

Step5) total_cost = cost + tax

Step6) print the total_cost

You might be interested in
What is relation of crankshaft and camshaft
Monica [59]
Mierda me dices solo necesito puntos
6 0
3 years ago
Read 2 more answers
A list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor. HERE
Free_Kalibri [48]

Using the knowledge of computational language in python it is possible to write a code that writes a list and defines the arrange.

<h3>Writing code in python:</h3>

<em>def isSorted(lyst):</em>

<em>if len(lyst) >= 0 and len(lyst) < 2:</em>

<em>return True</em>

<em>else:</em>

<em>for i in range(len(lyst)-1):</em>

<em>if lyst[i] > lyst[i+1]:</em>

<em>return False</em>

<em>return True</em>

<em>def main():</em>

<em>lyst = []</em>

<em>print(isSorted(lyst))</em>

<em>lyst = [1]</em>

<em>print(isSorted(lyst))</em>

<em>lyst = list(range(10))</em>

<em>print(isSorted(lyst))</em>

<em>lyst[9] = 3</em>

<em>print(isSorted(lyst))</em>

<em>main()</em>

See more about python at brainly.com/question/18502436

#SPJ1

7 0
2 years ago
How does a 2.5 MW wind turbine costing $ 4 million compare to a 5-kw wind turbine $3 /W? a) Same $/w b) Smaller $/w c) Larger $/
My name is Ann [436]
MW means megawatt, and one megawatt is a million Watts.
The 2.5 MW turbine is 4/2.5=1.6 $/w
Answer B
4 0
3 years ago
Write a naive implementation (i.e. non-vectorized) of matrix multiplication, and then write an efficient implementation that uti
erik [133]

Answer:

import numpy as np  

import time  

def matrixMul(m1,m2):      

   if m1.shape[1] == m2.shape[0]:  

       

       t1 = time.time()

       r1 = np.zeros((m1.shape[0],m2.shape[1]))

       for i in range(m1.shape[0]):

           for j in range(m2.shape[1]):

               r1[i,j] = (m1[i]*m2.transpose()[j]).sum()

       t2 = time.time()

       print("Native implementation: ",r1)

       print("Time: ",t2-t1)

       

       t1 = time.time()

       r2 = m1.dot(m2)

       t2 = time.time()

       print("\nEfficient implementation: ",r2)

       print("Time: ",t2-t1)

       

   else:

       print("Wrong dimensions!")

Explanation:

We define a function (matrixMul) that receive two arrays representing the two matrices to be multiplied, then we verify is the dimensions are appropriated for matrix multiplication if so we proceed with the native implementation consisting of two for-loops and prints the result of the operation and the execution time, then we proceed with the efficient implementation using .dot method then we return the result with the operation time. As you can see from the image the execution time is appreciable just for large matrices, in such a case the execution time of the efficient implementation can be 1000 times faster than the native implementation.

7 0
3 years ago
The product life cycle defines the stages that new products move through as they enter, are established in, and ultimately leave
Bas_tet [7]

Answer:

The four marketing mix of every new business are:

1. Product

2. Place

3. Price

4. Promotion

For each of the stages of product life cycle, those 4p should be use appropriately.

Explanation:

The four marketing mix of every new business are:

1. Product

2. Place

3. Price

4. Promotion

the product life cycle are directly proportional to the 4p of marketing. the product life cycle stages are introduction, growth, maturity and decline.

For each of the stages of product life cycle, those 4p should be use appropriately.

Stages of product life cycle and how the 4p fit into it.

The introduction stage:

at this stage, a new product just want to be introduced to the consumers. the product stage has being developed. The place where the product will fit in will also be consider. the location of people who consume this product. Pricing strategy consider a low price at the introduction stage, the business owner may not get any profit at this stage. then, continuous advertisement to create awareness of the product to the environment.

The growth stage:

the product will continuing to be move to different locations. the standard of the product quality will be maintained. the Pricing will start increasing. then, continuous advertisement to create awareness of the product and working on improving the product to suit the consumer.

the Mature stage:

At this stage, the consumer are fully aware of the product. wide range of location are reach. the pricing has reach its peak. Profit have been maximized. And, competitors of the product are in the market. Corporate social responsibility (CSR) will be the promotional value at this stage.

The Declining stage:

The business product have fully grown to its peak, and its only constant promotional values like CSR, advertisement, bonuses, can sustain it in the market. At this stage also, price comparison with other competitor should be carefully look into.

4 0
3 years ago
Other questions:
  • You want to determine whether the race of the defendant has an impact on jury verdicts. You assign participants to watch a trial
    9·1 answer
  • Radioactive wastes are temporarily stored in a spherical container, the center of which is buried a distance of 10 m below the e
    6·1 answer
  • Which situation might cause potential hazards at a construction site?
    12·2 answers
  • The heat input to an Otto cycle is 1000kJ/kg. The compression ratio is 8 and the pressure and temperature at the beginning of th
    8·1 answer
  • Let A→=(150iˆ+270jˆ) mm , B→=(300iˆ−450jˆ) mm , and C→=(−100iˆ−250jˆ) mm . Find scalars r and s, if possible, such that R→=rA→+s
    13·1 answer
  • Write a program that asks the user for the name of a file. The program should display the number of words that the file contains
    7·1 answer
  • Water flowing through both a small pipe and a large pipe can fill a water tank in 4 hours. Water flowing through the small pipe
    5·1 answer
  • Hello , how are yall:))))
    10·2 answers
  • What is the different between isometric view and isometric projection
    11·1 answer
  • In order to live and grow, bacteria need moisture, food, the right temperature, and ______? Fill in the blank
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!