Advertisement
For each of the below items be sure to write your code in S.pdf
Upcoming SlideShare
For Example 41 a student calculates PXlt4Ygt2 as.pdfFor Example 41 a student calculates PXlt4Ygt2 as.pdf
Loading in ... 3
1 of 1
Advertisement

More Related Content

More from rchopra4(20)

Advertisement

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.
Advertisement