Comparision operator | SoloLearn: Learn to code for FREE!

0

Comparision operator

https://code.sololearn.com/cW8zL6VzhvSd/# why isnt the vlaue for x has not been assigned in line2 ??

3/31/2020 11:58:30 AM

Mani

2 Answers

New Answer

+5

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)

0

BEN_10 Even I am getting error for this one https://code.sololearn.com/cW8zL6VzhvSd/?ref=app