text = """
Inserting comments into program code is normal practice.
As a result, every programming language has some way of allowing comments to be inserted into programs.
The objective is to add descriptions to parts of the code, either to document it or to add a description of the implemented algorithm."
"""
vowel = 'a' or 'e'
for i, vowel in enumerate(text):
if vowel == text:
print(f"Vowel {vowel} found in position {i}")
else:
continue
I am trying to create this block where it should show which of the vowels was found and its position in the text, however, when I run the program it doesn't execute anything. I started recently and I'm trying to understand why it's not working...
You have 2 problems.
vowelwill always start as'a', and never even get to theor 'e'part.vowelon every iteration of the loopAfter fixing the issues, turn your logic into a function and store the results in a more useful format. The below is an example.
use
output