Please help asap! i have 30 minutes!!
write a function sillystring() that replaces all vowels (a, e, i, o, and u) in a string with "oob" and returns that string to the caller.
for python!

Respuesta :

Answer:

def sillystring(input):

   output = ""

   vowels = ['a', 'e', 'i', 'o', 'u']

   for letter in input:

       if (letter.lower() in vowels):

           output += "oob"

       else:

           output += letter

   return output

Testing:

>>> print(sillystring('Hello, world!'))

Hooblloob, woobrld!