Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ef hasVowel (word): ''' - Return True when word is a string that contains a vowel (a,e,i,o,u,A,E,I,O,U). - It should work for both lower and

ef hasVowel(word): ''' - Return True when word is a string that contains a vowel (a,e,i,o,u,A,E,I,O,U). - It should work for both lower and upper case vowels. - When word doesn't have a vowel, return False. Return True otherwise. - If word isn't a string, return False (because it is not a string containing a vowel). - Hint: recall the boolean operator "in" and use that when checking if a character is a vowel. ''' return "stub" 

from lab03 import hasVowel # Tests for hasVowel def test_hasVowel_1(): assert hasVowel(True) == False def test_hasVowel_2(): assert hasVowel("Pythn") == False def test_hasVowel_3(): assert hasVowel("") == False def test_hasVowel_4(): assert hasVowel("borg") == True def test_hasVowel_5(): assert hasVowel("frEE") == True

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

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions