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
kykrilka [37]
4 years ago
14

There are six items to be rung up in the cash register. The first item costs $15.00. Each item after that costs an additional $2

.00. (item #2 costs $17, item #3 costs $19, etc.) Create Python program code using a for loop that will print the cost of each item, starting with the $15 item, and it will calculate and print the total cost. Your program should then use the sequence formula as an alternative way to calculate the total cost and print the result.
Engineering
1 answer:
Paha777 [63]4 years ago
4 0

Answer:

Explanation:

Below is the python code :

#using a for loop that will print the cost of each item

#first item cost is $15.0

item = [15.0]

tcost = 0.0

#for loop to print cost of each item and calculate total cost

for i in range(6):

tcost += item[i]

print('Cost of item ', (i+1), ' : $', item[i], sep = '')

item.append(item[i] + 2)

#print total cost

print('Total cost: $', tcost, sep = '')

print()

#Sequence formula to calculate the total cost

#total cost = n * ((first + last) / 2)

print('Calculating total cost using sequence formula')

tcost2 = 6 * ((15 + 25) / 2)

print('Total cost: $', tcost2, sep = ''

You might be interested in
Bainite has finer grains because the transformation takes place at a lower temperature where the nucleation rate is high relativ
kkurt [141]

Answer:

False

Explanation:

Bainite is a type of steel. It is formed by the decomposition of austenite. This happens at a temperature above MS but given that MS temperature is below the one where fine pearlite is formed.

In other words, when iron goes through a metastable crystallization phase Bainite is formed. It takes the rapid cooling, or quenching, of austenite for that to happen.

Metastability is the phenomenon where matter remains in an apparent state of equilibrium or stability even though it can achieve a more stable state. It can also be referred to as the condition of remaining in that pseudo unstable state for a very protracted period of time.

Bainite steel is used for the construction of components that require frequent usage and where plasticity, or tendency for deformity, as well as wear, cannot be tolerated.

Cheers

8 0
3 years ago
You are diving a car out in rural America and suddenly you get a flat tire. you pull off to the side of the road. you check your
julsineya [31]

Answer:

Walk to saftey!

Explanation:

4 0
3 years ago
Lee is in customer service. How can she best support her internal customer, Dan? O al Prioritize other tasks and customers O b)
frozen [14]

Answer:

freeeeeeeeeeeeeeeeeeeeeeeee

Explanation:

VVVVVVVVVVVVVVVVVVVVV

7 0
3 years ago
Quantity of erystallization centres in crystallization may increase a) insert imitation of crystallization b) use mechanical mix
babymother [125]

Answer: d) All of the above

Explanation: Crystallization is the process in which a solid crystalline structured material is obtained from the liquid substance. the quantity of crystallization center in crystal may increase due to several reasons like changing the cooling rate or mechanical mixing of the substances or imitation of crystals etc.

These processes end up adding mineral atoms to get attached to the center of crystal and hence increasing the size. Thus, the correct option is option (d).

4 0
3 years ago
What is geometrical shape?​
MatroZZZ [7]

Explanation:

Geometric Shapes can be defined as figure or area closed by a boundary which is created by combining the specific amount of curves, points, and lines.

7 0
3 years ago
Read 2 more answers
Other questions:
  • 1. (5 pts) An adiabatic steam turbine operating reversibly in a powerplant receives 5 kg/s steam at 3000 kPa, 500 °C. Twenty per
    12·1 answer
  • In the combination of resistors above, consider the 1.50 µΩ and 0.75 µΩ. How can you classify the connection between these two r
    6·1 answer
  • Which task best fits the role of a planning engineer?
    13·1 answer
  • A rapid sand filter has a loading rate of 8.00 m/h, surface dimensions of 10 m ´ 8 m, an effective filtration rate of 7.70 m/h.
    14·1 answer
  • The streamlines for an incompressible, inviscid, two dimensional flow field are all concentric circles, and the velocity varies
    8·1 answer
  • Giving 100 points for answer plzz
    10·2 answers
  • A dual-fluid heat exchanger has 10 lbm/s water entering at 100 F, 20 psia and leaving at 50 F, 20 psia. The other fluid is glyco
    13·1 answer
  • What are employers required to do to keep employees safe from caught-in and -between hazards from hand-held power tools?
    11·1 answer
  • Liquid methanol is pumped from a large storage tank through a 1-in.ID pipe at a rate of 3.00gal/mm.
    5·1 answer
  • What is the difference between absorbed wavelengths and reflected wavelengths?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!