Find answers, ask questions, and connect with our <br>community around the world.

Home Forums Scientific computing with Python Error without putting comma

  • Nishant

    May 19, 2024 at 8:56 am

    Hi @Tapas,

    The error in the Python code is due to incorrect syntax in the print statement. The variable z is not correctly separated by a comma from the string. The correct syntax should include a comma to properly format the output.

    In Python, to concatenate a string and a variable in a print statement, you need to separate them with a comma, which ensures that both the string and the variable are printed correctly. Without the comma, Python raises a syntax error.

    Hope that makes it clear.


    May 20, 2024 at 2:04 pm

    Thank you.

Log in to reply.

error: Content is protected !!