how do I change the article "a" to "an" when needed as it precedes input that sometimes starts with a vowel and therefore changes the grammar of the sentence.
ex: motorcycles = []
motorcycles.append('honda')
motorcycles.append('yamaha')
motorcycles.append('suzuki')
motorcycles.append('harley')
motorcycles.append('kawasaki')
motorcycles.append('aprilia')
motorcycles.append('indian')
motorcycles.append('bmw')
motorcycles.insert(0, 'ducati')
del motorcycles [1]
popped_motorcycle = motorcycles.pop()
print(motorcycles)
print(popped_motorcycle)
last_owned = popped_motorcycle
print(f"the last motorcycle I owned was a {motorcycles.pop()}")
if the input is "aprilia" or "Indian" the "a" before {motorcycles.pop()} needs to be changed to "an"
I also would love to know a more precise way to eplain this so that Im no only learning to code but also learning to communicate as a developer.
thanks for reading!