Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you help just with this two questions thank you. Q2(d)(i) The code below defines a method to output all of the orders for a

can you help just with this two questions thank you.

Q2(d)(i)

The code below defines a method to output all of the orders for a given customer. The code breaks a number of coding style guidelines suggested within M269.

def loop_through_orders_looking_for_customer(thelist, c): i = 0 for item in thelist.items: for key in item: if key == 'customer' and item[key] == c: print(item) i+=1 return i

Identify four areas where the coding style does not meet M269 guidelines. For each one, suggest an improvement/change that could be made with examples where appropriate.

Write your answer here

Q2(d)(ii)

State the complexity of loop_through_orders_looking_for_customer() and explain your reasoning.

Write your answer here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

ISBN: 3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

Discuss the importance of workforce planning.

Answered: 1 week ago

Question

Differentiate between a mission statement and a vision statement.

Answered: 1 week ago