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

Read the excerpt from the Newsela article "Mistaken Text Leads to Fundraiser." It began: "So. I was texted by a wrong number. I decided to mess with them, now I
Read the passage from "The Lady, or the Tiger.” It was the duty and the privilege of the person on trial to walk directly to these doors and open one of them. H
The story is Mississippi Solo
Please do it quick i need it and the quiz shuts off in 5 minutes ​
7,10,13 find the 33rd term
The diameter of a basketball rim is 18 inches. What is the circumference of the rim?
what is the value of x? ​
answer both PLSSS(for brain list, thanks and a five star review)
Did Britain Accept or Reject “Enlightenment”?
Find the 10th term of the arithmetic sequence 3x + 4, x+10, -x+ 16, ...