1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kogti [31]
3 years ago
12

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

Computers and Technology
1 answer:
Basile [38]3 years ago
6 0

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.

<em>This, in Python 3 is a sytax error</em>

You might be interested in
You are going to write a program for Computer test which will read 10 questions from a file, order them randomly and provide the
ollegr [7]

Answer:

from pprint import pprint

import random

match = {

   "mcq1": "a",

   "mcq2": "c",

   "mcq3": "c",

   "mcq4": "d",

   "mcq5": "a",

   "mcq6": "a",

   "mcq7": "a",

   "mcq8": "b",

   "mcq9": "d",

   "mcq10": "a"

}

file = open("test","r")

questions = set()

for i in range(10):

   ques = []

   for line in file:

       if "-" in line:

           break

       else:

           ques.append(line)

   questions.add(tuple(ques))

def quiz(questions, match):

   questions = list(questions)

   marks = 0

   for i in range(10):

       pprint(questions[i])

       mcq = "mcq",str(i+1)

       mcq = list(mcq)

       answer = input("enter your answer: ")

       if answer == match["".join(mcq)]:

           marks += 1

   return marks

print("Your score is: ",quiz(questions, match))

Explanation:

the file which has been loaded is test, and its data is provided below...

mcq1. The device which converts analog signals to digtital signals and vice versa is called.

a) mother board

b) TAP

c) Modem

d) I/O device

-

mcq2. The main components of a computer system are.

a) TAP, CPU, Printer

b) CPU, Input device

c) CPU, ALU, CU

d) CPU , Output device , Memory unit, Control unit

-

mcq3. A source program is a program.

a) writter in machine laguage

b) translated in machine langaue

c) written in high level language

d) required to boot a computer

-

mcq4.Which image format supports transparency in images.

a) PNG

b) GIF

c) JPG

d) A & B

-

mcq5. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq6. UNICODE is an example of.

a) character encoding set

b) driver

c) software

d) database

-

mcq7. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq8. NTFS stand for.

a) Network File Saving

b) New Technology File System

c) Newt Trend File Saving

d) Non Technology File System

-

mcq9. FF is example of.

a) Octal number system

b) Binary Number System

c) Decimal Number System

d) Hexadecimal number system

-

mcq10. Emails are sent with the help of ?

a) SMTP

b) FTP

c) HTTP

d) UDP

-

3 0
3 years ago
Can you help me solve this challenging activity?
diamong [38]

Answer:

user_age = int(input())

if user_age > 17 and user_age != 25:

   print("Eligible")

else:

   print("Not eligible")

Explanation:

3 0
1 year ago
Where is the fill handle located
Ronch [10]
The fill handle will appear as a small square in the bottom-right corner of the selected cell(s). Click, hold, and drag the fill handle until all of the cells you want to fill are selected. Release the mouse to fill the selected cells
4 0
2 years ago
You want high availability for DHCP services, a primary server to handle most DHCP requests, and a secondary server to respond t
babymother [125]

Answer:

The blocking system.

Explanation:

In order to avoid servers to replicate with each other, I should configure the blocking system of the first DHCP.

For example, if the first DHCP fails to respond, the second will get in place, however, I have to configure the first system that immediately that the second DHCP starts working, the first blocks its information and use.

By this way, there won´t be any duplicated actions or reponses.

5 0
3 years ago
Define the word profit in business
LenaWriter [7]
The answer is A. good luck 
6 0
3 years ago
Read 2 more answers
Other questions:
  • OSI is a seven-layered framework used to help define and organize the responsibilities of protocols used for network communicati
    6·1 answer
  • New Top Level Domains (TLDs) are coordinated by:_______.
    10·1 answer
  • Alexi is writing a program which prompts users to enter their age. Which function should she use?
    6·2 answers
  • if you were determining what was expected of you simply by looking at media, what messages would you take away?
    8·2 answers
  • Consider the following code segments that are potential replacements for /* missing code */.
    6·1 answer
  • How can i fix a all white phone screen
    11·2 answers
  • 8
    7·1 answer
  • Instructions
    13·1 answer
  • 4. When working at the CLI in Linux, you specify the exact location of a file, which is the ____________________ to it, by begin
    13·1 answer
  • Answer all of the questions,
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!