Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function def countvowel(vord) that returns a count of all vowels in the string word vowels are the lettets a,e,i, 0 and and their

image text in transcribed
Write a function def countvowel(vord) that returns a count of all vowels in the string word vowels are the lettets a,e,i, 0 and and their uppercase variations, A, E, 1,0 and U - Createa count variable - Use a for loop to check eoch character (ch) in the string (word) - Inside the for logp, use an if statement to test if the character is in AEiou (youmioht want to change each character to , upper () bere: -.It there is a' vowel, herease the count - Return the count from the function Ex If word is: Wonderful: then the return volue from the function is: because thece is an ' , 'e, and 'y Ex. If wond iit: fventuay then the resurn value from the function in: becuuse there are 'e, is, and'a: You only need to write the function. Unit tests will access your function. Mo need for input 0 or print statements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions

Question

Describe genes and the role they play in behavior.

Answered: 1 week ago