SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
For each of the below items, be sure to write your code in Spyder (or whatever Python application
you are using) and test them out by running them with appropriate function calls. Then paste your
function for each item into your submission document (you will just submit one document -- no
Python files).
i. Write a function named addFive(x) that takes a number x and returns x plus 5
ii. Write a function named combine(x, y) that takes two numbers x and y and returns the sum of
those two numbers.
iii. Write a function named sameEnds(word) that takes a string and returns True if the first and last
letter of the string are the same (e.g., "pop"), False if not (e.g., "pop!")
iv. Write a function named average(list) that takes a list of numbers and returns its mean.

Contenu connexe

Plus de rchopra4

For a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdfFor a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdfrchopra4
 
For a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdfFor a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdfrchopra4
 
For a random variable XVX was calculated to be 1 Is the.pdf
For a random variable XVX was calculated to be 1  Is the.pdfFor a random variable XVX was calculated to be 1  Is the.pdf
For a random variable XVX was calculated to be 1 Is the.pdfrchopra4
 
For 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdfFor 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdfrchopra4
 
For 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdfFor 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdfrchopra4
 
For 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdfFor 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdfrchopra4
 
Following is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdfFollowing is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdfrchopra4
 
For 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdfFor 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdfrchopra4
 
For 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdfFor 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdfrchopra4
 
For 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdfFor 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdfrchopra4
 
For 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdfFor 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdfrchopra4
 
Following the Crash of 1929 the stock market Multiple Choi.pdf
Following the Crash of 1929 the stock market Multiple Choi.pdfFollowing the Crash of 1929 the stock market Multiple Choi.pdf
Following the Crash of 1929 the stock market Multiple Choi.pdfrchopra4
 
Foliowing is the probability distribution of a random variab.pdf
Foliowing is the probability distribution of a random variab.pdfFoliowing is the probability distribution of a random variab.pdf
Foliowing is the probability distribution of a random variab.pdfrchopra4
 
Following Gali and Monacelli 2005 who utilize a utility fu.pdf
Following Gali and Monacelli 2005 who utilize a utility fu.pdfFollowing Gali and Monacelli 2005 who utilize a utility fu.pdf
Following Gali and Monacelli 2005 who utilize a utility fu.pdfrchopra4
 
follow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdffollow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdfrchopra4
 
Folds Anticlines and synclines Now that you undertand simp.pdf
Folds Anticlines and synclines  Now that you undertand simp.pdfFolds Anticlines and synclines  Now that you undertand simp.pdf
Folds Anticlines and synclines Now that you undertand simp.pdfrchopra4
 
focus on structuring your pages using HTML Why is it importa.pdf
focus on structuring your pages using HTML Why is it importa.pdffocus on structuring your pages using HTML Why is it importa.pdf
focus on structuring your pages using HTML Why is it importa.pdfrchopra4
 
Flowers Inc has both common and preferred stock There ar.pdf
Flowers Inc  has both common and preferred stock  There ar.pdfFlowers Inc  has both common and preferred stock  There ar.pdf
Flowers Inc has both common and preferred stock There ar.pdfrchopra4
 
Flow control of IP datagrams sent between a web browser and .pdf
Flow control of IP datagrams sent between a web browser and .pdfFlow control of IP datagrams sent between a web browser and .pdf
Flow control of IP datagrams sent between a web browser and .pdfrchopra4
 
Fixation is when allele frequencies stay exactly the same fo.pdf
Fixation is when allele frequencies stay exactly the same fo.pdfFixation is when allele frequencies stay exactly the same fo.pdf
Fixation is when allele frequencies stay exactly the same fo.pdfrchopra4
 

Plus de rchopra4 (20)

For a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdfFor a test of H0p050 the z test statistic equals 251 U.pdf
For a test of H0p050 the z test statistic equals 251 U.pdf
 
For a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdfFor a review session in preparation for an animal diversity .pdf
For a review session in preparation for an animal diversity .pdf
 
For a random variable XVX was calculated to be 1 Is the.pdf
For a random variable XVX was calculated to be 1  Is the.pdfFor a random variable XVX was calculated to be 1  Is the.pdf
For a random variable XVX was calculated to be 1 Is the.pdf
 
For 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdfFor 37 years Janet saved 250 at the beginning of every mon.pdf
For 37 years Janet saved 250 at the beginning of every mon.pdf
 
For 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdfFor 21 years Janet saved 850 at the beginning of every mon.pdf
For 21 years Janet saved 850 at the beginning of every mon.pdf
 
For 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdfFor 39 years Janet saved 450 at the beginning of every mon.pdf
For 39 years Janet saved 450 at the beginning of every mon.pdf
 
Following is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdfFollowing is the pea plant characteristics and the location .pdf
Following is the pea plant characteristics and the location .pdf
 
For 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdfFor 20Y2 McDade Company reported a decline in not income A.pdf
For 20Y2 McDade Company reported a decline in not income A.pdf
 
For 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdfFor 27 years Janet saved 900 at the beginning of every mon.pdf
For 27 years Janet saved 900 at the beginning of every mon.pdf
 
For 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdfFor 14 years Janet saved 800 at the beginning of every mon.pdf
For 14 years Janet saved 800 at the beginning of every mon.pdf
 
For 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdfFor 100 births P exactly 57 girls 00301 and P57 or mor.pdf
For 100 births P exactly 57 girls 00301 and P57 or mor.pdf
 
Following the Crash of 1929 the stock market Multiple Choi.pdf
Following the Crash of 1929 the stock market Multiple Choi.pdfFollowing the Crash of 1929 the stock market Multiple Choi.pdf
Following the Crash of 1929 the stock market Multiple Choi.pdf
 
Foliowing is the probability distribution of a random variab.pdf
Foliowing is the probability distribution of a random variab.pdfFoliowing is the probability distribution of a random variab.pdf
Foliowing is the probability distribution of a random variab.pdf
 
Following Gali and Monacelli 2005 who utilize a utility fu.pdf
Following Gali and Monacelli 2005 who utilize a utility fu.pdfFollowing Gali and Monacelli 2005 who utilize a utility fu.pdf
Following Gali and Monacelli 2005 who utilize a utility fu.pdf
 
follow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdffollow theses instructions and work on the page Chapter07pr.pdf
follow theses instructions and work on the page Chapter07pr.pdf
 
Folds Anticlines and synclines Now that you undertand simp.pdf
Folds Anticlines and synclines  Now that you undertand simp.pdfFolds Anticlines and synclines  Now that you undertand simp.pdf
Folds Anticlines and synclines Now that you undertand simp.pdf
 
focus on structuring your pages using HTML Why is it importa.pdf
focus on structuring your pages using HTML Why is it importa.pdffocus on structuring your pages using HTML Why is it importa.pdf
focus on structuring your pages using HTML Why is it importa.pdf
 
Flowers Inc has both common and preferred stock There ar.pdf
Flowers Inc  has both common and preferred stock  There ar.pdfFlowers Inc  has both common and preferred stock  There ar.pdf
Flowers Inc has both common and preferred stock There ar.pdf
 
Flow control of IP datagrams sent between a web browser and .pdf
Flow control of IP datagrams sent between a web browser and .pdfFlow control of IP datagrams sent between a web browser and .pdf
Flow control of IP datagrams sent between a web browser and .pdf
 
Fixation is when allele frequencies stay exactly the same fo.pdf
Fixation is when allele frequencies stay exactly the same fo.pdfFixation is when allele frequencies stay exactly the same fo.pdf
Fixation is when allele frequencies stay exactly the same fo.pdf
 

Dernier

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
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
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
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
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Dernier (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
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
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

For each of the below items be sure to write your code in S.pdf

  • 1. For each of the below items, be sure to write your code in Spyder (or whatever Python application you are using) and test them out by running them with appropriate function calls. Then paste your function for each item into your submission document (you will just submit one document -- no Python files). i. Write a function named addFive(x) that takes a number x and returns x plus 5 ii. Write a function named combine(x, y) that takes two numbers x and y and returns the sum of those two numbers. iii. Write a function named sameEnds(word) that takes a string and returns True if the first and last letter of the string are the same (e.g., "pop"), False if not (e.g., "pop!") iv. Write a function named average(list) that takes a list of numbers and returns its mean.