Complete Task 1: how_many_vowels
1) Complete the how_many_vowels() function.
Mark Breakdown
2) 2 additional doctests are created
a) Doctest output is accurate (0.5 marks x 2 = 1 mark)
b) Doctest passes (0.5 marks x 2 = 1 mark)
3) Does function pass all assignment doctests provided? (0.5
marks x 4 = 2 marks)
1. 2 3 Assignment 3 File Please complete the functions based on their definitions and examples 4 HI! 5 Edef how many vowels (text): II III 6 7. 8 9 This function counts the number of vowels in a text. Vowels are the characters a,e,i,o,u and are case insensitive :param text: string data :return: the number of vowels found in the string data 10 11 12 13 14 >>> how many_vowels ("ABC") 1 >>> how many_vowels ("aEi0") 4 >>> how many_vowels ("TRY 15 16 17 0 18 >>> how_many_vowels ("First Question") 5 19 20 Add 2 more Doctests 21 22 23 II III A 24 A pass # code goes here. Replace 'pass' with your own python code 25 26
Complete Task 1: how_many_vowels 1) Complete the how_many_vowels() function. Mark Breakdown 2) 2 additional doctests are
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am