No products in the cart.

Write a python program code ,input …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a python program code ,input a string and count number of vowels?
  • 2 answers

Himani Gautam 4 years, 11 months ago

string=input("Enter a string :") a=[] for i in string: if i=="a" or i=="e" or i=="i" or i=="o" or i=="u" or i=="A" or i=="E" or i=="I" or i=="O" or i=="U": a.append(i) print("There are",len(a),"vowels in",string)

Dev Ladhani 4 years, 11 months ago

n = str(input("Enter a string :")).lower() count =0 for i in range(len(str)): if (n[i]='a' or n[i]='e' or n[i]=='i' or n[i]=='o' or n[i] == 'u'): count+=1 print(count)
http://mycbseguide.com/examin8/

Related Questions

Write a program for swapping two numbers?
  • 0 answers
What is alu
  • 1 answers
Write a program for swapping two numbers
  • 1 answers
Define packages
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App