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
4vir4ik [10]
3 years ago
7

wo non-negative integers x and y are equal if either: Both are 0, or x-1 and y-1 are equal Write a function named equals that re

cursively determines whether two parameters (both containing integer values) are equal and returns True or False.
Computers and Technology
1 answer:
Mrac [35]3 years ago
3 0

Answer:

Using python programming language.

Explanation:

#to define the function write as below

def equal():

    #to get the two integers from the user

#The user is asked for input in the code below.

x = int(input("Enter the value for X"))

y= int(input("Enter the value for y"))

if x==0 and y==0:

    print("both numbers are ", "0")

elif: x==1 and y==1:  #This test if both x and y are 1

    print("true")

elif: x==y: #this line test if both values are equal

    print("true")

else:

    print("False")

equal()  #end of the function

You might be interested in
A recursive method without a special terminating case would _________. Hint: Self Check 13.3 had infinite number of isLucky() me
asambeis [7]

Answer:

You need exit condition like If, otherwise method will repeat endlessly.

7 0
3 years ago
Considering the traffic problem, do you think Rod handled the situation well?
svet-max [94.6K]
No he did not that was a poor choice.
7 0
3 years ago
The _____ option will require users to have a password to access the document.
Zepler [3.9K]
The login option will require users to have to have a password to access the document
6 0
3 years ago
Read 2 more answers
This component is responsible for the logical order of processing?
Svetradugi [14.3K]

Answer:

A) ALU

Explanation:

The arithmetic logic unit (ALU) performs the arithmetic and logical functions that are the work of the computer.

So, the correct option is - A) ALU

6 0
3 years ago
Need help with java project please!!
Irina18 [472]
 can do c++ and javascript but I might be able to help
send me a message
7 0
3 years ago
Read 2 more answers
Other questions:
  • Whichof the following is not a standard method called as part of the JSPlife cycle?jspInit()jspService()_jspService()jspDestroy(
    12·1 answer
  • What is a common method for testing a spot weld?
    13·1 answer
  • The purpose of a memo is to communicate directions, advice , or information true or false
    8·2 answers
  • Charli's password was changed a couple of weeks ago because someone figured it out. Can someone go to a password generator and f
    5·2 answers
  • What is an compiler?
    15·2 answers
  • True/False
    13·1 answer
  • What is are motor vehicle emissions?
    8·1 answer
  • ____________________ is the primary code humans use to communicate. (Points : 1
    9·1 answer
  • Why is it so important to adhere to principles that have been put forth by reputable organizations to ensure that you are mainta
    10·1 answer
  • You are working on a graphical app, which includes multiple different shapes. The given code declares a base Shape class with an
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!