CSC108H1 Lecture Notes - Lecture 20: Empty String, If And Only If
CSC108H1 verified notes
20/20View all
Document Summary
It isn"t practical or possible to test all possible input values. For example: a function that takes a string def . A function that counts the number of lowercase vowels in the passed string . In this case, we are concerned with the types of string argument s and the length of the string a user could enter. The string may be: empty, a single character long, a longer string. len len len . According to the above function definition"s needs, we are majorly concerned about whether the passed string is a. Non-vowel string in aeiou" string not in aeiou" string not in aeiou". Notice: we are not particularly concerned with what kind of non-vowel is in the string. For this function"s purpose, all non-vowels, alphabets, numbers or special characters, are treated alike and are not separate groups or cases.