Answer to Question #163306 in Python for sri

Question #163306

We would like to assess if there is any difference in the average price quotes provided by Mary and Barry. 


1
Expert's answer
2021-02-12T18:16:33-0500
m_price = [] # price quotes provided by Mary
b_price = [] # price quotes provided by Barry


for i in range(10):
   m_price.append(float(input("Enter Mary's price: ")))


for i in range(10):
   b_price.append(float(input("Enter Barry's price: ")))

m_average = 0
b_average = 0

for i in range(len(m_price)):
   m_average = m_average + m_price[i] / len(m_price)

for i in range(len(m_price)):
   b_average = b_average + b_price[i] / len(b_price)

if m_average == b_average:
    print("There are same average prices")
else:
    print("There are different average prices")


    

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS