We would like to assess if there is any difference in the average price quotes provided by Mary and Barry.Â
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")
  Â
Comments
Leave a comment