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
What is meant by ‘LASER’?
Zanzabum
Light Amplification by Stimulated Emission of Radiation
5 0
2 years ago
Read 2 more answers
Why are using some special characters (@, #, !, etc.) not a good idea?
konstantin123 [22]
There are pros and cons to using special characters in email subject lines. Generally, marketers report higher open rates.

Some report better engagement, but many don’t.

There are also reports of special characters causing problems with deliverability, mostly because spammers became very fond of special characters for a while.
5 0
3 years ago
Read 2 more answers
What is the exact number of bytes in system of memory that contains (a) 64K bytes (In Binary)(b) 32M bytes
VashaNatasha [74]

Answer:

64 K bytes = 65536 bytes

32 M bytes = 33554432 bytes

Explanation:

The question expect the number of bytes in binary instead of decimal. So this is important to understand that:

  • 1K bytes = 1024 bytes (in binary)

Therefore,

  • 64 Kb = 64 x 1024 =  65536 bytes

Using the similar calculation logic, we know

  • 1M bytes = 1024 x 1024 = 1048576 bytes (in binary)

Therefore,

  • 32 M bytes = 32 x 1048576 =  33554432 bytes
5 0
3 years ago
Contrast the following terms (provide examples): Partial dependency; transitive dependency
kiruha [24]

Answer:

Explanation:

Transitive dependency

In this case, we have three fields, where field 2 depends on field 1, and field three depends on field 2.

For example:

Date of birth --> age --> vote

Partial dependency

It is a partial functional dependency if the removal of any attribute Y from X, and the dependency always is valid

For example:

Course and student these tables have a partial dependency, but if we have the field registration date, this date will depend on the course and student completely, we must create another table with the field registration date to remove this complete dependency.

If we remove or update the table registration date, neither course nor student must not change.

5 0
2 years ago
The main reason to set a field size in access is to:
Nadya [2.5K]
The main reason to set a field size in access is to limit the lengths of value in the table.
Field size determines the limits or determines the maximum of text that can be input in the text or number field. Also, it may reduce data entry errors in changing the field size in access.
4 0
3 years ago
Other questions:
  • For some brand-name computers, the hard drive contains a partition that can be used to reinstall windows. what is the name for t
    6·1 answer
  • 2. Identify the diagram and define it.<br>13. What are pollen grains ?<br>4. What is an embryo?​
    12·1 answer
  • An array UnsortedInt consists of integers in random order. Another array SortedInt consists of a sorted list of integers.
    13·1 answer
  • You use a cisco 2900 router in your network. you are considering purchasing and implementing the Unifield communications feature
    8·1 answer
  • What is human data,
    8·1 answer
  • Write a computer program that computes the duration of a projectile’s flight and its height above the ground when it reaches the
    11·1 answer
  • Binary is used to store what on a computer?<br> •Data<br> •Dates<br> •Address
    13·2 answers
  • Requests to retrieve data written in a language such as SQL are called…
    8·1 answer
  • Which of the following statements best explains how multitasking works in the human mind?
    11·1 answer
  • (Synchronized threads) Write a program that launches 1000 threads. Each thread adds a random integer (ranging from 1 to 3, inclu
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!