List Exercises

Exercise #1

nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]


If the number 5 is in the list print “list has 5”


Exercise #2


nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]


Add 3 to each number in the list

Exercise #3

nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]


Make each number in the list an even number

Exercise #4

nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]


Change the odd numbers to even numbers but leave the even numbers the same

Exercise #5

word = “Kerfuffle”


Write a program that prints each letter in word

Exercise #6

word = “Kerfuffle”


Write a program that makes every other letter of word capital.

Example : KeRfUfFlE

Exercise #7

nums = [86, 71, 62, 93, 54, 78, 93, 121, 104, 125, 89]


Write a program that prints out all the elements of nums that are less than 75

Exercise #7

nums = [86, 71, 62, 93, 54, 78, 93, 121, 104, 125, 89]


Write a program that takes the elements in nums and converts them to letters or characters.