Comparision operator | SoloLearn: Learn to code for FREE!


Comparision operator why isnt the vlaue for x has not been assigned in line2 ??

3/31/2020 11:58:30 AM


2 Answers

New Answer


Mani because you can't do power operation between string and integer . In second line of your code x is string value while 8 in int value so you cannot do mathematical operation between them. Use type conversion here. Your code should be like this: x= int(input()) y=(x**8) print(y) print(y>=x) print(7 > 5) print(10 < 10)


BEN_10 Even I am getting error for this one