sebast1an17 sebast1an17
  • 01-04-2021
  • Computers and Technology
contestada

Can someone tell me how this is a SyntaxError! (Python3)

Can someone tell me how this is a SyntaxError Python3 class=

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 06-04-2021

Answer:

The expression on line 9 required 2 brackets

Explanation:

Given

The attached code

Required

Why syntax error.

The error points to line 10, but the error is actually from line 9

To get an integer input, the syntax is:

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

From the attached code, the line 9 is:

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

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

This, in Python 3 is a sytax error

Answer Link

Otras preguntas

Which measure is equivalent to 3 mi? 1 ft = 12 in. 1 mi = 5280 ft 440 in. 15,840 in. 63,360 in. 190,080 in.
Which type of stretching uses gentle, slow motions?
What are the two body forms of cnidarians?
Explain how the position of the decimal changes in a quotient as you divide by increasing powers of 10.
Which of the following is a part of a nucleotide? SELECT ALL THAT APPLY a base b acid c sugar d phosphate group How many phosphate groups does an ATP contain? D
In an individual that is heterozygous for a particular trait, the recessive allele is not expressed.
A is an unknown number when you round a to the nearest thousand you get 21,000 when you round a to the nearest hundred you get 20,500
What are some common elements found in Islamic mosques
Find the value of y for the given value of x. y=1-2x;x=9 y=
How did access to the silk road affect chinas economy?