+ 2
Help me
I have written a code but it is causing problem please help me x = int(input()) y = int(input()) z = int(input()) d = y-x e = z-y a = d+z if d ==e: print("Your input sequence was",x,y,z,"\n""Next term will be", a) else: (statement) please help for adding this feature Thanks https://code.sololearn.com/ce1Dl85m7H6e/?ref=app
3 Answers
+ 3
Your code seems to work fine
https://code.sololearn.com/c5kbbWBWiTq0/?ref=app
+ 6
Your linked code doesn't match your posted code. The linked gave 35 for 15, 20, & 30, which seems reasonable to me. The posted code won't run as the print is not indented so the if doesn't have one or more statements as required.
+ 5
@John Wells
Thanks for help
The code doesn't match because it was not working and I had decided to do not use that and then I made it much simpler