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

fun facts about Uranus the planet?
Who do you think snitched on Anne Frank and her family?
A 36-tooth gear turns three times. It is connected to a 12-tooth gear. How many times does the 12-tooth gear turn?
What do epidermis and the dermis have in common? Could you please help me with me questions?
A swimming pool  20 m long and 10 m wide is surrounded by a deck of uniform width. The total area of the swimming pool and the deck is 704 m^2. Find the width o
If the circumference of a baseball is 24 cm what is the volume of the object
Indicate true or false as to whether the following equation is quadratic 2x-4x+1=0
what type of monkey starts with an h?
If a pizza costs 2.85 to make and customer pays 8.95 how much profit have I made as a percentage
What is the first 30 numbers of pi?Last one Promise!