Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

hamza_b23

  • 3 years ago

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."

  • This Question is Closed
  1. rsmith6559
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    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.

  2. agdgdgdgwngo
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    http://ideone.com/fl6aH

  3. agdgdgdgwngo
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

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

  4. agdgdgdgwngo
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

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

  5. rsmith6559
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

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

  6. agdgdgdgwngo
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    right rsmith :(

  7. hamza_b23
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    thanks a lot @agdgdgdgwngo

  8. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy