286,317 views
24 votes
24 votes
How is this a SyntaxError?(python3)

How is this a SyntaxError?(python3)-example-1
User Thedeepfield
by
2.5k points

1 Answer

7 votes
7 votes

Answer:

1 bracket, instead of 2 is closed in line 9

Step-by-step explanation:

Given

The attached code

Required

Why is line 10 a syntax error?

The error points to line 10.

From the attached code, the line 9 is:

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

When converting an input to integer, the syntax is:

variable = int(input("Prompt"))

But, only 1 bracket is closed in the program, where 2 is required.

This is definitely a syntax error

User JuanSedano
by
3.0k points