Python programming Language

posted by .

Assume S is a string of lower case characters. Write a program that counts up the number of vowels contained in the string S. Valid vowels are 'a', 'e', 'I', 'o', and 'u'. For example, if S='azcbobobegghakl' your program should print: Number of Vowels:5

  • Python programming Language -

    s = raw_input('supply a string')
    s = s.lower()
    s = list(s)
    v = ['a','e','i','o','u']
    c = 0
    for a in s:
    if a in v:
    c+=1

    print "the answer is ", c

  • Python programming Language -

    Gbadebo, I'm sure u'r a FUTA 200L student, a friend also gave me ds question, plus d other two u posted. I already solved bur she stopped me frm posting dm online. You can contact me @ 08020803585

  • Python programming Language -

    s = raw_input('supply a string')
    s = s.lower()
    s = list(s)
    v = ['a','e','i','o','u']
    c = 0
    for a in s:
    if a in v:
    c+=1

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. computer science /use java language

    write the program that inputs a string representing a binary number(0s and 1s). First, your program should veerify that it is indeed a binary number, that is, the number contains only 0s and 1s . if that is not the case, your program …
  2. Statistics

    I'm looking at my notes and I can't seem to figure how my teacher did this problem. She used her name which has 9 letters, 3 vowels, and 6 consonants. If we were to reach in the bag and grab 3 letters out. By using the probability …
  3. java

    Write the following methods and test them.this need to be execute it in Eclipse IDE for Java Developers 1. printVowels - this method should take a String as a parameter and print all the vowels contained in that String one character …
  4. C++ programming computer

    I'm having some trouble trying to program these problems and putting them into the main function. Please help me by giving some advice or website that offer good information for me. The questions are below here: 1. Write a function …
  5. Computer Programming using python

    Assume s is a string of lower case characters. Write a program that counts up the number of vowels contained in the string s. Valid vowels are: 'a', 'e', 'i', 'o', and 'u'. For example, if s = 'azcbobobegghakl', your program should …
  6. Computer Programming using python

    Assume s is a string of lower case characters. Write a program that prints the number of times the string 'bob' occurs in s. For example, if s = 'azcbobobegghakl', then your program should print Number of times bob occurs is: 2 For …
  7. Computer Programming using python

    Assume s is a string of lower case characters. Write a program that prints the longest substring of s in which the letters occur in alphabetical order. For example, if s = 'azcbobobegghakl', then your program should print Longest substring …
  8. programming

    Assume s is a string of lower case characters. Write a program that counts up the number of vowels contained in the string s. Valid vowels are: 'a', 'e', 'i', 'o', and 'u'. For example, if s = 'azcbobobegghakl', your program should …
  9. programming

    1. Assume there are n-tyres that could be used by car, tricycle and bicycle. Write an algorithm to accept n-tyres and generate all the combinations of cars, tricycle and bicycle that would exhaust the n-tyres. 2. Assume S is a string …
  10. programming

    10. Develop a C++ program that accepts the name of a person and then counts how many vowels the person’s name have.

More Similar Questions