0

Num1=int(input("Enter number") if(Num1%2==0) print ("no.is even") else : print ("no.is odd"). Wrong kya hai

27th Jul 2018, 4:03 PM
Sandeep Singh
Sandeep Singh - avatar
3 ответов
+ 5
Num1=int(input("Enter number")) if(Num1%2==0) print ("no.is even") else : print ("no.is odd") always indent your code proper it's very important for python?
27th Jul 2018, 4:09 PM
Maninder $ingh
Maninder $ingh - avatar
+ 1
Maninder Singh Sandeep Singh This also needs a colon at the end of the ‘if’ line. Mentioning this just in case...
27th Jul 2018, 4:51 PM
Russ
Russ - avatar
+ 1
usually written as this: ''' Num1=int(input("Enter number")) if Num1%2==0: print ("no.is even") else : print ("no.is odd") '''
27th Jul 2018, 6:12 PM
Flandre Scarlet
Flandre Scarlet - avatar