Mar-19-2021, 09:57 PM
Welcome to the forums :)
The syntax highlighting should make it clear, but line 5 is a syntax error. There's a single quote in the middle of the string that ends the string prematurely. Either wrap the string in double quotes, or in triple quotes:
If those don't fix your issue, please share the traceback Python gives, or explain what the issue is if it's logical instead of syntactical.
The syntax highlighting should make it clear, but line 5 is a syntax error. There's a single quote in the middle of the string that ends the string prematurely. Either wrap the string in double quotes, or in triple quotes:
#currently ans=str(input('if Javab is higher please enter k and it is lower please enter b and if it's equal enter d')) # double quotes ans=str(input("if Javab is higher please enter k and it is lower please enter b and if it's equal enter d")) # triple quotes ans=str(input('''if Javab is higher please enter k and it is lower please enter b and if it's equal enter d'''))Also, the last line will overwrite the
print()
function with "yes it's true" instead of printing anything. The assignment is almost definitely a typo.If those don't fix your issue, please share the traceback Python gives, or explain what the issue is if it's logical instead of syntactical.