SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
# We have the following rectangles records in a list of dictionaries.
rectangles = [{ "ID": "Rect1", "Length": 40, "Breadth": 25, "Color": "red" },
{ "ID": "Rect2", "Length": 30, "Breadth": 20, "Color": "blue" },
{ "ID": "Rect3", "Length": 70, "Breadth": 45, "Color": "green"},
{ "ID": "Rect4", "Length": 20, "Breadth": 10, "Color": "purple"}
]
def sort_rectangles(title):
# Using insertion sort to solve this problem.
# sort by title.
# return rectangles.
return rectangles
Hint: We have studied how insertion-sort algorithm works. Implement the insertion-sort
algorithm first and modify it to solve the
above task Using Insertion Sort approach, write a function sort_rectangles (title) that takes as
input and sort the rectangles in ascending order by title. You need to return the updated rectang
les list. Note: The type of title input can be "ID", "Length", "Breadth", or "Color".

Contenu connexe

Similaire à # We have the following rectangles records in a list of dictionaries.pdf

List_tuple_dictionary.pptx
List_tuple_dictionary.pptxList_tuple_dictionary.pptx
List_tuple_dictionary.pptxChandanVatsa2
 
Master the arrays and algorithms using Algotutor
Master the arrays and algorithms using AlgotutorMaster the arrays and algorithms using Algotutor
Master the arrays and algorithms using AlgotutorVivekanandaGN1
 
13. Pointer and 2D array
13. Pointer  and  2D array13. Pointer  and  2D array
13. Pointer and 2D arrayGem WeBlog
 
R_CheatSheet.pdf
R_CheatSheet.pdfR_CheatSheet.pdf
R_CheatSheet.pdfMariappanR3
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-arrayDeepak Singh
 
50 SDE Interview Questions.pdf
50 SDE Interview Questions.pdf50 SDE Interview Questions.pdf
50 SDE Interview Questions.pdfHeyCoach
 
ARRAY in python and c with examples .pptx
ARRAY  in python and c with examples .pptxARRAY  in python and c with examples .pptx
ARRAY in python and c with examples .pptxabhishekmaurya102515
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functionsSwarup Boro
 
Python 101++: Let's Get Down to Business!
Python 101++: Let's Get Down to Business!Python 101++: Let's Get Down to Business!
Python 101++: Let's Get Down to Business!Paige Bailey
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfaroraopticals15
 
Write a function called float dotproduct (links to an external site.)(float a...
Write a function called float dotproduct (links to an external site.)(float a...Write a function called float dotproduct (links to an external site.)(float a...
Write a function called float dotproduct (links to an external site.)(float a...JenniferBall48
 
Multi dimensional arrays
Multi dimensional arraysMulti dimensional arrays
Multi dimensional arraysAseelhalees
 

Similaire à # We have the following rectangles records in a list of dictionaries.pdf (20)

List_tuple_dictionary.pptx
List_tuple_dictionary.pptxList_tuple_dictionary.pptx
List_tuple_dictionary.pptx
 
Master the arrays and algorithms using Algotutor
Master the arrays and algorithms using AlgotutorMaster the arrays and algorithms using Algotutor
Master the arrays and algorithms using Algotutor
 
Array and string
Array and stringArray and string
Array and string
 
13. Pointer and 2D array
13. Pointer  and  2D array13. Pointer  and  2D array
13. Pointer and 2D array
 
R_CheatSheet.pdf
R_CheatSheet.pdfR_CheatSheet.pdf
R_CheatSheet.pdf
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-array
 
Lecture 15 - Array
Lecture 15 - ArrayLecture 15 - Array
Lecture 15 - Array
 
Chapter 13.pptx
Chapter 13.pptxChapter 13.pptx
Chapter 13.pptx
 
50 SDE Interview Questions.pdf
50 SDE Interview Questions.pdf50 SDE Interview Questions.pdf
50 SDE Interview Questions.pdf
 
Arrays
ArraysArrays
Arrays
 
ARRAY in python and c with examples .pptx
ARRAY  in python and c with examples .pptxARRAY  in python and c with examples .pptx
ARRAY in python and c with examples .pptx
 
Arrays and library functions
Arrays and library functionsArrays and library functions
Arrays and library functions
 
Python
PythonPython
Python
 
Python 101++: Let's Get Down to Business!
Python 101++: Let's Get Down to Business!Python 101++: Let's Get Down to Business!
Python 101++: Let's Get Down to Business!
 
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdfHomework Assignment – Array Technical DocumentWrite a technical .pdf
Homework Assignment – Array Technical DocumentWrite a technical .pdf
 
Write a function called float dotproduct (links to an external site.)(float a...
Write a function called float dotproduct (links to an external site.)(float a...Write a function called float dotproduct (links to an external site.)(float a...
Write a function called float dotproduct (links to an external site.)(float a...
 
Multi dimensional arrays
Multi dimensional arraysMulti dimensional arrays
Multi dimensional arrays
 
Unit ii data structure-converted
Unit  ii data structure-convertedUnit  ii data structure-converted
Unit ii data structure-converted
 
GE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_NotesGE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_Notes
 
Arrays
ArraysArrays
Arrays
 

Plus de alstradecentreerode

(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdf(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdfalstradecentreerode
 
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdfalstradecentreerode
 
(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdf(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdfalstradecentreerode
 
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdfalstradecentreerode
 
(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdf(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdfalstradecentreerode
 
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdfalstradecentreerode
 
(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdf(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdfalstradecentreerode
 
(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdf(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdfalstradecentreerode
 
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdfalstradecentreerode
 
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdfalstradecentreerode
 
(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdf(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdfalstradecentreerode
 
#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdf#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdfalstradecentreerode
 
#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdf#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdfalstradecentreerode
 
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdfalstradecentreerode
 
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
 �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdfalstradecentreerode
 
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
 �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdfalstradecentreerode
 
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
 �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdfalstradecentreerode
 
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
 �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdfalstradecentreerode
 
�Cu�l de los siguientes se considera un indicador principal de la e.pdf
 �Cu�l de los siguientes se considera un indicador principal de la e.pdf �Cu�l de los siguientes se considera un indicador principal de la e.pdf
�Cu�l de los siguientes se considera un indicador principal de la e.pdfalstradecentreerode
 

Plus de alstradecentreerode (20)

(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdf(Rational Class) - use the original files to create the new progra.pdf
(Rational Class) - use the original files to create the new progra.pdf
 
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
(Q001) Expand the Geotour10 folder in Google Earth by clicking the t.pdf
 
(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdf(if any) is your opportunity cost.pdf
(if any) is your opportunity cost.pdf
 
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
(Forecasting and forecast error metrics calculation) Suzy Homemaker .pdf
 
(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdf(Elementary Statistics) Computer=1100(102r+1).pdf
(Elementary Statistics) Computer=1100(102r+1).pdf
 
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
(Derecho empresarial) X le otorga a Y un patrimonio vitalicio. Pos.pdf
 
(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdf(d) Give a single line of R code that will produce a plot exactly li.pdf
(d) Give a single line of R code that will produce a plot exactly li.pdf
 
(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdf(5 points) There are seven boys and six girls. Coach wants to select.pdf
(5 points) There are seven boys and six girls. Coach wants to select.pdf
 
(2ab)5.pdf
(2ab)5.pdf(2ab)5.pdf
(2ab)5.pdf
 
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
(1)1�(1+.10000000000000000000000(100))�2(126127) The single precision .pdf
 
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
(1)CT13.1) Your parents are considering investing in Apple Inc. co.pdf
 
(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdf(10 points) Construct a BST by inserting the following keys into an .pdf
(10 points) Construct a BST by inserting the following keys into an .pdf
 
#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdf#2 Listed below are the numbers of triplets born in a country each y.pdf
#2 Listed below are the numbers of triplets born in a country each y.pdf
 
#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdf#52 In a large American university in 1969, the male and female pro.pdf
#52 In a large American university in 1969, the male and female pro.pdf
 
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf#define LOGFILE signal_log.txt  Signal handlers void sigusr1.pdf
#define LOGFILE signal_log.txt Signal handlers void sigusr1.pdf
 
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
 �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf �Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
�Los Premios Darwin honran adecuadamente sus ideas sobre la selecci.pdf
 
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
 �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf �derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
�derine NTHikEaDs 10 itatic thresd-t thread void nolint all cosit os .pdf
 
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
 �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf �Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
�Es el az�car bueno... malo... ninguno... ambos Dime por qu�. �Cu�.pdf
 
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
 �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf �Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
�Cu�les de los siguientes son ejemplos de intervenciones de educa.pdf
 
�Cu�l de los siguientes se considera un indicador principal de la e.pdf
 �Cu�l de los siguientes se considera un indicador principal de la e.pdf �Cu�l de los siguientes se considera un indicador principal de la e.pdf
�Cu�l de los siguientes se considera un indicador principal de la e.pdf
 

Dernier

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 

Dernier (20)

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 

# We have the following rectangles records in a list of dictionaries.pdf

  • 1. # We have the following rectangles records in a list of dictionaries. rectangles = [{ "ID": "Rect1", "Length": 40, "Breadth": 25, "Color": "red" }, { "ID": "Rect2", "Length": 30, "Breadth": 20, "Color": "blue" }, { "ID": "Rect3", "Length": 70, "Breadth": 45, "Color": "green"}, { "ID": "Rect4", "Length": 20, "Breadth": 10, "Color": "purple"} ] def sort_rectangles(title): # Using insertion sort to solve this problem. # sort by title. # return rectangles. return rectangles Hint: We have studied how insertion-sort algorithm works. Implement the insertion-sort algorithm first and modify it to solve the above task Using Insertion Sort approach, write a function sort_rectangles (title) that takes as input and sort the rectangles in ascending order by title. You need to return the updated rectang les list. Note: The type of title input can be "ID", "Length", "Breadth", or "Color".