I am working on this code:
print("welcome into my program")
print("you want to know the percentage then type yes")
o=input
if str(o)=='yes':
t=input("enter the total marks\n")
x=input("enter your marks\n")
p=(int(x)*100)/int(t)
print("This is your percentage =",p)
else:
print("bye :)")
I am getting output as shown:
welcome into my program
you want to know the percentage then type yes
bye :)
When I run my code it doesn't take input from user it directly goes to the else block. Can anyone explain to me how to fix it?