0
Can any one say how to do the program to find even or odd without using conditional operators.
i do this program but the problem is both even & odd in printing in my output statements
9 Respuestas
+ 1
num=int(input("enter a number"))
print("the number is:",num)
num%2==0
print("even")
num%2==1
print("odd")
0
use bitwise operations and dictionary.
0
can ha i used bitwise also that what i am saying both even and odd are printing so plz can u right the code and post wth in 10mins
0
plz
0
I can't give you working program. May be later.
Here's an idea. Use the dictionary to map 0 to even and 1 to odd. Then call the bitwise and of 1 and your input into the dictionary. Ta Da!! I know, right?!
0
no & 1 && print("odd")|| print("even")
like this only na ??
0
can any plz say the answer
0
don't give me hints if your free then plz pus ( the code) progam