1. Write a function that takes in a list of integers and returns a new list where...
Question:
1. Write a function that takes in a list of integers and returns a new list where each element is the result of multiplying the corresponding element in the input list by its index in the list (i.e. the first element in the output list should be the result of multiplying the first element in the input list by its index, the second element in the output list should be the result of multiplying the second element in the input list by its index, and so on). For example, if the input list is [2, 4, 6], the output list should be [0, 4, 12].
2. Write a function that takes in a string and returns a new string where all the vowels in the input string are replaced with the character ''. The function should be case-insensitive, so it should replace both upper and lower case vowels. For example, if the input string is "Hello World!", the output string should be "Hll* W*rld!".
Introduction To Computing And Programming In Python A Multimedia Approach
ISBN: 9780134025544
4th Edition
Authors: Mark J. Guzdial, Barbara Ericson