SlideShare a Scribd company logo
1 of 1
Download to read offline
PYTHON CODING
III. Write a function that takes a list of numbers as input and returns the average of
thosenumbers. For example, if the function is called with the list [1, 2, 3, 4, 5], it should return 3.
IV. Write a function that takes a list of numbers as input and returns the largest number in the
list.For example, if the function is called with the list [1, 5, 2, 8, 3], it should return 8.
V. Write a program that takes a list of numbers as input and prints out all pairs of numbers in
thelist that add up to a given target number. For example, if the input list is [1, 2, 3, 4, 5] and
thetarget number is 7, the program should print out:[2, 5][3, 4]

More Related Content

More from 3rdeyesolutions

python code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdfpython code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdf3rdeyesolutions
 
PYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdfPYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdf3rdeyesolutions
 
Python - Explain the concept- and why you found it interesting- How w.pdf
Python -  Explain the concept- and why you found it interesting- How w.pdfPython -  Explain the concept- and why you found it interesting- How w.pdf
Python - Explain the concept- and why you found it interesting- How w.pdf3rdeyesolutions
 
Put the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdfPut the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdf3rdeyesolutions
 
Put the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdfPut the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdf3rdeyesolutions
 
Put the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdfPut the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdf3rdeyesolutions
 
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdfPut an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf3rdeyesolutions
 
Pure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdfPure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdf3rdeyesolutions
 
public class EllipsoidList { private String list- private Array.pdf
public class EllipsoidList {     private String list-    private Array.pdfpublic class EllipsoidList {     private String list-    private Array.pdf
public class EllipsoidList { private String list- private Array.pdf3rdeyesolutions
 
Public Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdfPublic Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdf3rdeyesolutions
 
public class ImpPythTripEx public static double---- triples - new d.pdf
public class ImpPythTripEx    public static double---- triples - new d.pdfpublic class ImpPythTripEx    public static double---- triples - new d.pdf
public class ImpPythTripEx public static double---- triples - new d.pdf3rdeyesolutions
 
public class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdfpublic class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdf3rdeyesolutions
 
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdfPT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf3rdeyesolutions
 
public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf
public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdfpublic class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf
public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf3rdeyesolutions
 
Proxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdfProxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdf3rdeyesolutions
 
Psychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdfPsychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdf3rdeyesolutions
 
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdfPruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf3rdeyesolutions
 
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdfPSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf3rdeyesolutions
 
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdfProvider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf3rdeyesolutions
 
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdfProvide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf3rdeyesolutions
 

More from 3rdeyesolutions (20)

python code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdfpython code plz Task 2 1- Create a list with the digits in your studen.pdf
python code plz Task 2 1- Create a list with the digits in your studen.pdf
 
PYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdfPYTHON - time and space complexity for the next function- def some_fun.pdf
PYTHON - time and space complexity for the next function- def some_fun.pdf
 
Python - Explain the concept- and why you found it interesting- How w.pdf
Python -  Explain the concept- and why you found it interesting- How w.pdfPython -  Explain the concept- and why you found it interesting- How w.pdf
Python - Explain the concept- and why you found it interesting- How w.pdf
 
Put the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdfPut the steps of endochondral ossification in the correct order- Your.pdf
Put the steps of endochondral ossification in the correct order- Your.pdf
 
Put the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdfPut the events of HIV infection in the correct order- HIV fuses to the.pdf
Put the events of HIV infection in the correct order- HIV fuses to the.pdf
 
Put the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdfPut the following events in the proper order of occurrence when RIK pa.pdf
Put the following events in the proper order of occurrence when RIK pa.pdf
 
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdfPut an I if the term refers to Innate Immunity Put an A if the term re.pdf
Put an I if the term refers to Innate Immunity Put an A if the term re.pdf
 
Pure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdfPure tone averages (PTAs) give us information about- how well a person.pdf
Pure tone averages (PTAs) give us information about- how well a person.pdf
 
public class EllipsoidList { private String list- private Array.pdf
public class EllipsoidList {     private String list-    private Array.pdfpublic class EllipsoidList {     private String list-    private Array.pdf
public class EllipsoidList { private String list- private Array.pdf
 
Public Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdfPublic Administration -what kind of challenges does the Department of.pdf
Public Administration -what kind of challenges does the Department of.pdf
 
public class ImpPythTripEx public static double---- triples - new d.pdf
public class ImpPythTripEx    public static double---- triples - new d.pdfpublic class ImpPythTripEx    public static double---- triples - new d.pdf
public class ImpPythTripEx public static double---- triples - new d.pdf
 
public class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdfpublic class Integenthalysis public static doumle analyreints(iet max-.pdf
public class Integenthalysis public static doumle analyreints(iet max-.pdf
 
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdfPT ANRJ  issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
PT ANRJ issues a IDR 450 million IPO priced at IDR 130 per share- and.pdf
 
public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf
public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdfpublic class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf
public class DimmableFloorLamp extends FloorLamp implements Dimmable - (1).pdf
 
Proxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdfProxemics refers to the- a- the role of videography and photography in.pdf
Proxemics refers to the- a- the role of videography and photography in.pdf
 
Psychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdfPsychologists have studied identical twins and have identified specifi.pdf
Psychologists have studied identical twins and have identified specifi.pdf
 
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdfPruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
Pruvided helow are the Iether stades for thiee sectans of MATH 245 tha.pdf
 
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdfPSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
PSLO3 available evidence- A competent nurse utilizes in formation tech.pdf
 
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdfProvider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
Provider of Care - Diagnostic and Patient Monitoring- - Provider of Ca.pdf
 
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdfProvide code that achieves the following objectives- 1- -1pt- - Declar.pdf
Provide code that achieves the following objectives- 1- -1pt- - Declar.pdf
 

Recently uploaded

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 

Recently uploaded (20)

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 

PYTHON CODING III- Write a function that takes a list of numbers as in.pdf

  • 1. PYTHON CODING III. Write a function that takes a list of numbers as input and returns the average of thosenumbers. For example, if the function is called with the list [1, 2, 3, 4, 5], it should return 3. IV. Write a function that takes a list of numbers as input and returns the largest number in the list.For example, if the function is called with the list [1, 5, 2, 8, 3], it should return 8. V. Write a program that takes a list of numbers as input and prints out all pairs of numbers in thelist that add up to a given target number. For example, if the input list is [1, 2, 3, 4, 5] and thetarget number is 7, the program should print out:[2, 5][3, 4]