Finding Even Numbers In Python

后端 未结 2 1799
暗喜
暗喜 2021-01-25 18:24

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

2条回答
  •  感动是毒
    2021-01-25 18:39

    You can still use an if else and check for multiple conditions with the if block

    if first_int % 2 == 0 and second_int % 2 == 0:
        print ("Both even")
    else:
        print("Not Both Even")
    

提交回复
热议问题