Homework Problem Set #6 - Functions
Homework Problem Set #6 - Functions
1. Write a function that takes in a single argument, calculates the sum of all the digits of the
argument, and returns “even” or “odd” based on the sum.
2. Write a function that takes in two parameters, two words. The function should return the longer
of the two words.
3. Write a function that takes in two parameters, a word and a number. The function should return
True if the word has more characters than the number and False if it does not.
4. Write a function called rearrange(word,n) that takes in two parameters, a string and an integer.
Take the first letter of the string and move it to the end of the word and complete this process n
times. Return the new string.