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
PtichkaEL [24]
2 years ago
5

Please answer this coding question

Computers and Technology
1 answer:
Gnesinka [82]2 years ago
7 0

The fix to the problem in the code is as follows:

def sum(a, b):

   total = a + b

   print(total)

sum(1, 0)

<h3>How to determine the problem and the fix to the problem?</h3>

The code is given as:

def sum(a, b):

   total = a + b

   print(total)

   sum(total, a)

sum(1, 0)

When the above code is run, one or both of the following would occur

  • An infinite loop because the program cannot end the recursion
  • An error when the maximum memory is used

The problem in the code is that, the recursive function do not have a condition to end itself.

The fix to the problem is to remove the recursive definition.

So, we have the fixed code to be

def sum(a, b):

   total = a + b

   print(total)

sum(1, 0)

Read more about python programs at:

brainly.com/question/26497128

#SPJ1

You might be interested in
Data bars describe a graphic element that
Alexus [3.1K]
The correct option is C.
The data bar in Excel allows users to visualize values in a range of cells. Data bar is a conditional format that makes it easy to view and compare the values of a range of cells at the same time. A longer bar represent a larger value and a shorter bar represents a smaller value. 
5 0
3 years ago
Read 2 more answers
Write a program (C++) that reads a number between 1,000 and999,999 from the user where the user enters a comma in the input.Then
mr Goodwill [35]

<u>C++ program to print the digit without a comma </u>

#include<iostream>

#include<string>

using namespace std;

void commaremoval(string num)  /*Defining function commaremoval with parameter num of string type*/

{  

string  s=num;

for(int i=0; i< s.length();i++)

   {

    if(s[i]!=',') /*Checking whether the string doesn't contain ' ,' */

       cout<<s[i];  //Printing Output without comma

   }  

}

//driver function

int main()

{

string num;

cout<<"Enter a digit between 1,000 and 999,999:"<<endl; /*taking input from user*/

cin>>num;

commaremoval(num); //calling function

return 0;

}

<u>Output</u>

Enter a digit between 1,000 and 999,999:  22,343

22343

7 0
3 years ago
List the steps you took to configure SERVERC and take a screen shot of the Connect to DNS Server dialog box by pressing Alt+Prt
Oksi-84 [34.3K]

Answer: Main Steps are as under;

1. Add servers to the server administrator • On the SVR-MBR-C computer, click All Servers.

2. After installation right click all servers icon, the SVR-MBR-C restarts.

3. On the Active tab and the selected Adatum domain, click Find Now Select the SVR-DC-A server and click the arrow and Search results. The server appears in the selected list.

4. In SVR-MBR-C, in Server Manager, click Manage> Add Roles and Features.

5. The Add Roles and Features Wizard appears, showing before you begin

6. Add AD DS as Roles.

7. 7. Promote the server after adding roles to a domain controller

8. After installation SVR-MBR-C restarts.

Explanation:

Main Steps are as under;

1. Add servers to the server administrator • On the SVR-MBR-C computer, click All Servers.

2. After installation right click all servers icon, the SVR-MBR-C restarts.

3. On the Active tab and the selected Adatum domain, click Find Now Select the SVR-DC-A server and click the arrow and Search results. The server appears in the selected list.

4. In SVR-MBR-C, in Server Manager, click Manage> Add Roles and Features.

5. The Add Roles and Features Wizard appears, showing before you begin

6. Add AD DS as Roles.

7. 7. Promote the server after adding roles to a domain controller

8. After installation SVR-MBR-C restarts.

6 0
4 years ago
Quality answers will be appriciated! :)​
Naddika [18.5K]
<h2>1.</h2>

  1. F
  2. T
  3. T
  4. T
  5. F
  6. F
  7. T

________

<h2>2.</h2>

  1. A
  2. B
  3. D5*E5
  4. A

6 0
3 years ago
Read 2 more answers
Many Java programs that you create will receive and process user input. In order to ensure that user input is accurate, you will
Furkat [3]

Answer: True

Explanation: True

4 0
3 years ago
Other questions:
  • A ____ is a structure that allows repeated execution of a block of statements.
    13·2 answers
  • All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
    15·1 answer
  • A spreadsheet program has many subparts. What is the smallest unit in a spreadsheet?
    9·2 answers
  • Guidelines:
    6·1 answer
  • In the context of web and network privacy, an acceptable use policy is _____.
    15·1 answer
  • Businesses finance their operations using a mixture of ______. debt,
    14·1 answer
  • If two different devices try to transmit to a common device at the same time, switches suffer from a problem in the collision do
    13·1 answer
  • Clocks (also called timers) are essential to the operation of any multiprogrammed system. They maintain the time of day, and pre
    9·1 answer
  • Vhat is the result when you run the following program?
    6·1 answer
  • Prior to the 1996 NEC, ____ receptacles and cords were permitted. However, now it is mandatory that a separate equipment groundi
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!