I have a Python assignment that is as following: "Write a complete python program that asks a user to input two integers. The program then outputs "Both Even” if both of the integers are even. Otherwise the program outputs "Not Both Even”."
I planned on using an if and else statement, but since I'm working with two numbers that have to be even instead of one, how would I do that?
Here is how I would do it if it was one number. Now how do I add the second_int that a user inputs???
if first_int % 2 == 0
print ("Both even")
else: print("Not Both Even")
Aucun commentaire:
Enregistrer un commentaire