1
The exercise is as follows:
Make a program where the user type a letter and a number integer. If the letter is vowel and the number is even, or the letter is consonant and odd number, show "BAZINGA!". Otherwise, show "SHAZAM!".
I did it that way:
vogal = ["a","e","i","o","u"]
par = [0,2,4,6,8,10]
letra = input("Entre com a letra: ")
numero = input("Entre com o numero: ")
if letra in vogal and numero in par:
print("Bazinga!")
elif letra not in vogal and numero in par:
print("Shazam!")
else:
print("Bazinga!")
However, when I execute this code, even if I enter with "b" and "2", the output will come out Bazinga, and as stated in the exercise should be "Shazam" the output. What’s wrong with my code? Thank you.