#CS Help.

1 messages · Page 1 of 1 (latest)

silver swift
#

The problem is:
`Find the Number of Vowels in a String (Without Counting Duplicates)

Problem Statement: Write a program that asks the user to input a string. The program should count and display the total number of unique vowels (a, e, i, o, u) in the string, regardless of whether they are uppercase or lowercase. You must handle both capital and small letters. If a vowel appears more than once, count it only once.`

If u know python, you'll have no problem solving this.
I just need the code. >__<

granite finchBOT
#
  1. Ask your question and show the work you've done so far. If you've posted a screenshot of a question, specify which part you need help with.
  2. Wait patiently for a helper to come along.
  3. Once someone helps you, say thank you and close the thread with:
    +close
    
  4. Feel free to nominate the person for helper of the week in #helper-nominations
  5. Do not ping the mods, unless someone is breaking the rules. If there is a conflict amongst multiple helpers feel free to ping “Helper Mod”
  6. If you're happy with the help you got here, and the server overall, you can contribute financially as well:
lost palm
#

are A and a counted as separate vowels?

#

if the string is Animal, should i display A, i or a, i or even A, i, a?

silver swift
lost palm
#

i would just try using string.lower() to turn it all lowercase, check if each character is a vowel and, if so, whether it’s in a list of previous vowels
add the vowel to the list if it’s not already in it, then print the list at the end