Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

I need help on this codes that i don't know how to do please help me out, Python language is perferred i have a friend who knows C, if you know in C that may be helpful i will tell my friend to interpret it but please i need help on these 3 codes. 1) It says parameter name is "remove_vowels: (str) -> str" and the description is "Return a new str that is identical to the input str except that the vowels have been removed. Vowels are the letters a,e,i,o,u. We do not consider y a vowel."

OpenStudy (rsmith6559):

Iterate through the input string, one character at a time. Test each character to see if it's in the set of vowels, and if it isn't output it.

OpenStudy (anonymous):

http://ideone.com/fl6aH

OpenStudy (anonymous):

should have added the uppercase characters in that string of vowels but that's one way of implementing it in python

OpenStudy (anonymous):

In C: http://ideone.com/6xFV2

OpenStudy (rsmith6559):

agdgdgdgwngo, silly question: after the memcpy, wouldn't a '\0' need to be added to terminate str?

OpenStudy (anonymous):

right rsmith :(

OpenStudy (anonymous):

thanks a lot @agdgdgdgwngo

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!