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
Which of these monitor connector types is the oldest and least desirable to use?
ella [17]

Answer:

DVI is the oldest out of the four.

Explanation:

DVI and VGA are the oldest, but DVI is oldest and least desirable to use since it is outdated.

5 0
3 years ago
Read 2 more answers
What are the other number systems? and how to convert binary numbers to their decimal equivalent.?
Mrrafil [7]
In computers we use: decimal constantly, hexadecimal daily, octal weekly and binary monthly.  Decimal is base 10, hexadecimal is base 16, octal is base 8 and binary is base 2.

To convert binary to decimal, simply add the magnitudes of the digits that are set.
7 0
3 years ago
What is the answer to this binary?
USPshnik [31]
Relating to, using, or expressed in a system of numerical notation that has 2 rather than 10 as a base.
5 0
3 years ago
A + B (AC (B +C’) D) = A + BD
zmey [24]
Yo what is that i’m confused
5 0
3 years ago
Read 2 more answers
Which new console should i buy Nintendo switch Xbox series x or a ps5
Musya8 [376]

Answer:

you should buy the xbox series x, it has better quality and xbox is just better in general

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • What linux command displays the ip address and subnet mask?
    11·1 answer
  • What are options in the Advanced tab in the Share Workbook dialog box? Check all that apply
    14·2 answers
  • It is important to ____ the line in the code editing window in the exact location where you want to insert a code snippet to pro
    10·1 answer
  • 1. Extract title Write a function extract_title that takes one parameter, the filename of a GenBank formatted file, and returns
    14·1 answer
  • Ryan is looking to buy a new HDTV set. He knows from friends that LCD set screens reflect less light than plasma set screens, bu
    10·1 answer
  • List all the components of a computer
    14·2 answers
  • Identify a true statement about heuristics: a. They are more complicated than algorithms. b. Unlike algorithms, they do not perm
    15·1 answer
  • What is 14.10 to the tenth power​
    14·1 answer
  • Francisco is becoming a dad for the first time. He feels relatively clueless about all things involving parenting and is looking
    12·1 answer
  • Distributed databases and data warehouses would be considered which data model type?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!