Quiz
1.Write a function, max_value
, that takes in an integer and prints the numbers from 1 to that number inclusively.
2.Write a function, compare_lists
, that given two lists of the same length , will compare each element of the lists and print out the higher value at each index.
3.Write a function, swapping_stars
, that will print out the following:
* - * - * -
- * - * - *
* - * - * -
- * - * - *
* - * - * -
- * - * - *
Extra Credit
Write a function, find_secret
, that takes in a list of lists and an item. Once it finds the item it will print both indexes of where the item is.
Example:
list_of_lists = [['where', 'is', 'the'],
['very', 'secret', 'word'],
['i', 'can', 'find']
]
secret_item = 'secret'
find_secret(list_of_lists, secret_item) # will print: 1, 1