IDNLearn.com: Where your questions are met with thoughtful and precise answers. Get the information you need quickly and accurately with our reliable and thorough Q&A platform.

Can anyone tell me how this is a SyntaxError! (Python/coding)

Can Anyone Tell Me How This Is A SyntaxError Pythoncoding class=

Sagot :

Answer:

The expression on line 9 requires 2 brackets

Explanation:

Given

The attached code

Required

Why syntax error.

On line 9 of the program, we have::

amount = int(input("Enter cheese order weight: ")

The instruction on line 9 gets an integer input from the user. However, this is incorrectly done

To get an integer input, the syntax is:

variable-name = int(input("Prompt"))

By comparing the syntax to the actual code on line 9, only 1 of the brackets is closed.

In Python 3, this is counted as a syntax error

We appreciate your presence here. Keep sharing knowledge and helping others find the answers they need. This community is the perfect place to learn together. Your search for answers ends at IDNLearn.com. Thanks for visiting, and we look forward to helping you again soon.