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
After you log in to PowerPoint Online, what is the first thing you need to do to start creating a presentation?
ivann1987 [24]

Answer:

click create new presentation -_- i use power poin all the time

Explanation:

im not dum

4 0
3 years ago
Read 2 more answers
When creating envelopes, how will you adjust the layout?
Burka [1]
It D because I hade this too so it is D
4 0
3 years ago
Read 2 more answers
During project management, who executes tasks and produces the deliverables as stated in the project plan and as directed by the
san4es73 [151]
B. Project team members
8 0
3 years ago
PLEASE HELP ASAP!!!
Studentka2010 [4]

If you are using CSS :

table {

   border-collapse: collapse;

   border: 5px solid black;

   width: 100%;

}

td {

   width: 50%;

   height: 2em;

   border: 1px solid #ccc;

}

HTML

<table>

   <tbody>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

   </tbody>

</table>

for HTML:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Sample table</title>

<style>

table {

   border-collapse: collapse;

   border: 5px solid black;

   width: 100%;

}

td {

   width: 50%;

   height: 2em;

   border: 1px solid #ccc;

}

</style>

</head>

<body>

<table>

   <tbody>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

   </tbody>

</table>

</body>

</html>

3 0
3 years ago
Whats 9+9+9+9x999-86 divided by 874 times 8764
Alexxandr [17]

Answer:

8155.63844394

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • How do I download the Microsoft word on my Hp probook
    8·2 answers
  • Select all that apply.
    8·2 answers
  • How do you do these two questions? The first might have multiple answers and the second will have only one answer.
    14·1 answer
  • What is the shortest, abbreviated version of the copy running-config startup-config command?
    6·1 answer
  • Chen needs to configure a filter on the current folder and would like to filter by the sender of a message. Which tab in the Fil
    7·2 answers
  • A strategic information system can be any kind of information system that uses information technology to help an organization __
    11·1 answer
  • Describe in detail what each step would look like if you ran into a software error.
    7·1 answer
  • Suppose you are working as an administrative assistant at a small law firm. Your boss has asked you to send an invitation out to
    5·1 answer
  • 40 points
    5·2 answers
  • You have a filtered dataset for Customer Sales with some null value rows. You want to remove these rows completely. How will you
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!