(Apr-29-2020, 07:01 AM)bowlofred Wrote: Your error message should have told you where it happened as well. In this case, you've defined (or assigned) newword within theUpper_Vowels
function. But it's not defined outside.
You've tried to use that variable on line 18 where it is not in scope. Presumably you wanted to passsentence
to the function, notnewword
.
this is error message on line 18 where it happened
print(Upper_Vowels(newword))
NameError: name 'newword' is not defined
When I remove that character 'newword' from line 18,
print(Upper_Vowels())then I got a typeerror on line 18, like this.
TypeError: Upper_Vowels() missing 1 required positional argument: 'newword'