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
GarryVolchara [31]
3 years ago
13

Assume you want to write a code to calculate the addition of two numbers digit by digit. Provide the running time for your algor

ithm, assuming the inputs are two n-digit numbers. Explain your answer
Computers and Technology
1 answer:
Sergio039 [100]3 years ago
5 0

Answer:

Explanation:

Using Python programming language

Explanation:

1. I defined a function add and passed in two parameters (a,b).

2. In the block of the function, I added the two numbers and printed the result.

3. I decided to use a function so that the program is re-usable and can accept various inputs.

Find the code below. (# are used for comments)

#Addition of numbers

def add(a,b):

   print(a+b)

#Test Cases

add(2,4.5)      #Result=6.5

add(10,290)     #Result=300

add(2.567,4.58) #Result=7.147

You might be interested in
Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
Inessa05 [86]
Helpful, resourceful, friendly, welcoming.
8 0
3 years ago
Read 2 more answers
Some files appear dimmed in one of the default folders on your computer. What would be the best course of action? A. Leave the f
stira [4]
I believe it is B hope this helped you<span />
5 0
3 years ago
Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
PIT_PIT [208]

I believe the pathways are Audio/Visual Technology and Film, Journalism and Broadcasting and Printing Technology .


5 0
3 years ago
Read 2 more answers
Who watches the show gravity falls, if you do, if you play the theme song for the first episode backwards you get a hiding messi
Yakvenalex [24]
I don’t really knowwww but thanks
4 0
2 years ago
Read 2 more answers
Energy from sources that can be regenerated or reused is called what?
miskamm [114]

Energy from sources that can be regenerated or reused is called renewable energy.

Renewable energy is energy that can be replenished on a human timescale like hydro-electric power, solar energy and wind power. Geothermal energy is also considered renewable energy.

7 0
3 years ago
Other questions:
  • Determine the number of bytes necessary to store an uncompressed binary image of size 4000 × 3000 pixels.
    9·1 answer
  • The specifications for ____ are developed by the world wide web consortium (w3c) and are continually evolving.
    13·1 answer
  • After a robbery, what is the purpose of conducting a neighborhood canvass?
    9·1 answer
  • _________ are represented using diamonds linked withparticipant ETs
    6·1 answer
  • Componets of computer
    5·1 answer
  • If you filmed a clip in 120fps, how many frames are in a seconds of video.
    13·1 answer
  • What X coordinate does the center of a game begin at?
    9·1 answer
  • Describe at least three virus scanning techniques
    13·1 answer
  • In the cis configuration, the methyl groups are placed _____.
    8·2 answers
  • Identify the correct answer in each item. Write your answer on the blank provided before
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!