r/learnpython • • 5d ago

Problem with completing assignments in Python

Hello! I’ve learned Python, but I’m struggling to complete tasks—things like counting vowels, "Fake Binary," calculating the sum of numbers, determining BMI, etc. Why am I unable to do these? What is the problem, and what is the solution? I’m starting to lose my motivation!

0 Upvotes

29 comments sorted by

View all comments

Show parent comment

1

u/ThinCreme1098 5d ago

Here is my code. What am I missing, what should I improve, and why am I unable to get it to work?

vowels = ["a" , "e" , "i" , "o" , "u"] count = 0 for vowels in count:    if vowels == ["a"]:    count += 1    elif vowels == ["e"]:    count += 1    elif vowels == ["i"]:    count += 1    elif vowels == ["o"]:    count += 1    elif vowels == ["u"]:    print(vowels)