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
kolezko [41]
1 year ago
8

Help debugging line 7 type error more arguments (5) than expected (1)

Computers and Technology
1 answer:
kolezko [41]1 year ago
3 0

Answer:

import random

score = 0

for i in range(5):

   num1 = random.randint(1, 100)

   num2 = random.randint(1, 100)

   prompt = "What is " + str(num1) + "+" + str(num2) + "?"

   answer = int(input(prompt))

   result = (num1, num2)

   if answer == result:

       print("Well done!")

       score += 1

   else:

       print("incorrect")

print("Your score was", score)

Explanation:

Your error is on <em>line 7</em>, where you are providing multiple arguments to the input function, instead of 1.

One way to solve this is to create a variable prompt and concatenate all strings and variables within that variable to use for the input.

You might be interested in
What did creator Markus “Notch" Persson initially call his game
Veronika [31]

Answer:

Cave Game

Explanation:

Its initial Name was to be game cave in the developer phase and later changed to minecraft order of the stone and later changed to minecraft

7 0
3 years ago
Read 2 more answers
5. Bits are sent over a communications channel in packets of 12. (a) If the probability of a bit being corrupted over this chann
user100 [1]

Answer:

0.889

Explanation:

7 0
4 years ago
Computers can think for themselves<br><br> True<br><br> False
gizmo_the_mogwai [7]

Answer:

false

Explanation:

4 0
3 years ago
Read 2 more answers
Which of these statements regarding​ time-cost tradeoffs in CPM networks is​ true?
g100num [7]

Answer:

B. Crashing  is not possible unless there are multiple critical tasks.

8 0
3 years ago
Suppose we have a 4096 byte byte-addressable memory that is 32-way high-order interleaved, what is the size of the memory addres
iogann1982 [59]

Answer:

7

Explanation:

Given that :

Byte-addressable memory = 4096

Order = 32

Rwqritying such that they have the same base ;

4096 = 2^12

32 = 2^5

2^12 - 2^5

12 - 5 = 7

4 0
3 years ago
Other questions:
  • 1. Bones do not change position when the muscles contract and release.
    7·1 answer
  • The network services and facilities that users interact with are provided by
    11·1 answer
  • Use the SAS dataset insure to create a dataset, work.insure10, that (a) only reads in the variables Name, Policy, Company, PctIn
    9·1 answer
  • What problems have arisen regarding use of the Internet for global business transactions, and how are they being resolved?
    15·1 answer
  • Click/press _______ to remove the most recently typed text.
    12·2 answers
  • https://brainly.com/question/10197478#:~:text=Option%20A%20is%20the%20correct,in%20return%20of%20their%20money.
    13·1 answer
  • Which of the following rights is NOT guaranteed by copyright?
    11·1 answer
  • True or false. The CPU requires it's own power from the power supply, and can't receive power from the motherboard.
    9·1 answer
  • TOT al<br>Name TWO examples of these settings and utilities. (2)​
    12·1 answer
  • What the advantages and disadvantages of file sharing to the users​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!