Question: Debugging Challenge You're trying to write code that will count the number of vowels in your name, storing that value in counter. To get started,

Debugging Challenge
You're trying to write code that will count the number of vowels in your name, storing that value in counter. To get started, you store your name in the
variable my_name and write the code you see below. However, the code below is not quite working...work to debug the code below to accomplish the
task!
[]: # Debug the following code
my_name == 'Shannon'
vowels =['A','E','I','0','U','a','e','i','o','u']
counter =0
for char in my_name:
if char == vowels:
counter =1
# The counter should be the total number of vowels in my_name, which is 2
print (counter)
 Debugging Challenge You're trying to write code that will count the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!