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
Mariulka [41]
2 years ago
14

Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter.

So, pass oneMore( 12) and it will return 13. DO NOT DEFINE this function-- just assume it is available. YOUR TASK: write an expression whose value is 5 but in your expression you can only use the integer literal 0. You can not use anything with the digits 1-9 and you cannot use any arithmetic operators like + - * /. But you can use 0 and you can make calls to the function oneMore.
Computers and Technology
1 answer:
jek_recluse [69]2 years ago
7 0

Answer:

oneMore(oneMore(oneMore(oneMore(oneMore(0)))))

Explanation:

  • As a function has been explained which when given an integer results as a next integer. oneMore(given-integer)= next integer
  • As we are restricted to use 0 only and can't use operators like + - * /.
  • We have to obtain a value 5
  • So doing step-by-step:

             (oneMore(0))=1

             (oneMore(oneMore(0)))=2

             (oneMore(oneMore(oneMore(0))))=3

             (oneMore(oneMore(oneMore(oneMore(0)))))=4

             oneMore(oneMore(oneMore(oneMore(oneMore(0)))))=5

You might be interested in
3. The Central Processing Unit is made of
monitta

Answer:

a

Explanation:

jjwjwjwwjwjwjwjwjwj#k#kwkekee

4 0
2 years ago
(in PYTHON) Write a function in REPL.it that uses three parameters, and squares the first, calculates mod 5 of the second parame
tatiyna

Answer:

I wrote this myself, it should be working. I think this is what the instructions were looking for.

The code below should return

Squared: 1296  

Mod: 0        

Quadrupled: 16

Explanation:

def threeParams(squared, mod, quadruples):

   array = [squared, mod, quadruples]

   array[0] = squared ** 2

   array[1] = mod % 5

   array[2] = quadruples * 4

   return array

valueArr = threeParams(36, 15, 4)

print(f"Squared: {valueArr[0]}\nMod: {valueArr[1]}\nQuadrupled: {valueArr[2]}")

4 0
2 years ago
Charging current being returned to the battery is always measured in DC Amps. true or false
Rom4ik [11]

Answer:Charging current being returned to the battery is always measured in DC Amps. Electrical energy will always flow from an area of low potential to an area of high potential. ... One volt is the pressure required to force one amp of current through a circuit that has 1 Ohm of resistance.

Explanation:

5 0
2 years ago
A bare metal area surrounded by body filler after sanding indicates:
Lera25 [3.4K]

its a high spot being sanded im in auto body as well.

8 0
3 years ago
The computers in the administrative offices of the four schools throughout the district are networked to enable employees to acc
muminat
These computers in administrative offices or schools throughout the district that are networked to each other has the type of network most likely used by the workers is LAN network. Usually LAN networks are used in small offices or rooms.
3 0
3 years ago
Other questions:
  • Format Painter cannot be used to copy only character attributes. True or False
    12·1 answer
  • Decisions 1 and 3 are both ____________ decisions because ____________________.
    9·1 answer
  • When you include a word cover page in a multi page document, the cover page is not considered the first page. True or false?
    13·1 answer
  • These are questions from my Computer/Customer Support Class
    6·1 answer
  • A database program helps to ____________.
    9·2 answers
  • Suppose you have four 500 MB hard drives plus one 2 GB flash drive. How many GB of capacity is this overall?
    12·1 answer
  • PLZ HELP I AM TIMED!!!!
    11·2 answers
  • Select the correct answer.
    9·1 answer
  • . Write a function sumLastPart which, only using list library functions (no list comprehension), returns the sum of the last n n
    6·1 answer
  • Which camera is interchangeable<br><br> freeform<br><br> hybrid<br><br> DSLR<br><br> point and shoot
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!