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
spin [16.1K]
3 years ago
8

Write a function that takes two arguments and returns their sum.

Computers and Technology
1 answer:
zavuch27 [327]3 years ago
5 0

Answer & Explanation #1

To answer your first query. You can write a function that takes two arguments and returns their sum like this:

#Python program to add two numbers using a function

def add_num(a,b): #function for addition

   sum=a+b

   return sum #return value

num1=25  #variable declaration

num2=55

print("The sum is",add_num(num1,num2)) #call the function

Answer & Explanation #2

As for your error, I believe it is an indent error in your first return statement. All you must do is indent the return statement.

You might be interested in
Write a for loop to print the numbers from 20 to 30, inclusive (this means it should include both the 20 and 30). The output sho
soldi70 [24.7K]

In python:

for i in range(20, 31):

   print(i, end=" ")

3 0
3 years ago
WHAT DOES THE SCRATCH CODE BELOW DO?
Natasha_Volkova [10]

Answer:

the first one

Explanation:

3 0
3 years ago
Kylie lives near a beautiful beach and has grown up surfing the waves. Many families come to visit her area and Kylie has notice
ch4aika [34]
La gente de que no me han dicho que me ha dado un teléfono y me han
4 0
3 years ago
Which model involves the creation of data and process models during the development of an application?
guapka [62]
It seem like there are information missing on the question posted. Let me answer this question with all I know. So here is what I believe the answer is, <span>the creation model involves the creation of data and process models during the development of an application.</span>

Hope my answer would be a great help for you.    If you have more questions feel free to ask here at Brainly.
7 0
3 years ago
Read 2 more answers
1. Which of the following accurately describes a piece of work that contains a Creative Commons: No Derivative Works license?
frez [133]
1. B
2. C
3. C
Just did the test, these are the right answers!
3 0
3 years ago
Read 2 more answers
Other questions:
  • which resource do programmers sometimes have to refer to and use during planning the logical steps of the solution
    15·2 answers
  • Certain medications can increase risk of obtaining a sunburn true or false
    12·1 answer
  • Which of the following parameters should match in order for a pair of routers to form an adjacency when running OSPFv2? (Points
    9·1 answer
  • The special operator used to check for similar character strings is ____.
    13·1 answer
  • In this project you will write a set of instructions (algorithm). The two grids below have colored boxes in different
    9·2 answers
  • Ple Choice Worth 5 points)
    11·1 answer
  • ______________ memory is a small, high-speed, high-cost memory that servers as a buffer for frequently accessed data
    9·2 answers
  • What refers to a set of instructions executed in order?
    6·1 answer
  • The events that happen in a story are called the _________________.
    14·2 answers
  • Which of the following is the key business objective behind the technologies implemented by PCL Construction, as discussed in th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!