Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

hamza_b23

  • 2 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
    • 2 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
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    http://ideone.com/fl6aH

  3. agdgdgdgwngo
    • 2 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
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

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

  5. rsmith6559
    • 2 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
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    right rsmith :(

  7. hamza_b23
    • 2 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

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.