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

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

Can anyone tell me how this is a SyntaxError Pythoncoding class=

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 06-04-2021

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

Answer Link

Otras preguntas

Who makes federal laws?
When must all men register for the Selective Service?
What is the color of the indicator thymol blue in a solution that has a pH of 11? (1) red (3) pink (2) blue (4) yellow
is the planet Uranus surface rocky or flat?
A bird flies 2.8 due west and then 2.7 due north. Another bird flies 2.7 due west and 2.8 due north. What is the angle between the net displacement vectors for
examples of elastic and inelastic goods... ( at least 20 examples) URGENT..............
Given the balanced equation representing a reaction: O2 --> O + O What occurs during this reaction? (1) Energy is absorbed as bonds are brok
Convert 7.0055 into a mixed number in simplest form?
Which class of organic compounds contains nitrogen? (I) aldehyde (2) alcohol (3) amine (4) ether
what are the functions of Holloware