Write a function that takes two arguments and returns their sum.
In the main part of your program (the part that isn't inside a function), call your
function to test it out.

Answers

Answer 1

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.


Related Questions

Top/Bottom Rules allow a user to apply conditional formatting to cells that fall within the top or bottom numbers or percentile. How many items will it allow the user to include in the rule?

the top or bottom 10 items or top or bottom 10% only
the top 10 items and top 10% only
the top or bottom 100 items only
any logical number of items or percentages in top or bottom value frames

Answers

C. TRUST

Explanation:

Answer:

*clears throat* ......... its c....... thank you for your time :).............. *standing ovation*

Explanation:

Plz help
You want Excel to automatically apply “stripes” in an alternating pattern to existing raw data in your spreadsheet. Describe the precise steps you could take to do so. What other function would be added when you apply this change, assuming you have a header row and leave the default options selected?

Answers

Answer:

1)Select the cells you want to shade.

2)On the Home tab of ribbon select Conditional Formatting > New Rule

3)Select 'Use a formula to determine which cells to format' > enter your formula in the 'Edit the Rule Description' field.

4)Click the Format button and from the Format Cells dialog box select the Fill tab > choose your weapon (colour, pattern, fill effect etc.):

Explanation:

a 0.600 kg dynamics trolley has 1.5 kg load added. It is launched with a force of 10.n what is the acceleration

Answers

Answer:

acceleration = 4.76 m/s²

Explanation:

Given that"

the mass of the dynamic trolley = 0.6 kg

the mass of the load  = 1.5 kg

total mass = (0.6 + 1.5) kg = 2.1 kg

the force = 10 N

Thus;

using the formula of force which is;

Force = mass × acceleration

10 = 2.1  × acceleration

acceleration = 10/2.1

acceleration = 4.76 m/s²

PLEASE HELP

This is your code.

>>> A = [21, 'dog', 'red']

>>> B = [35, 'cat', 'blue']

>>> C = [12, 'fish', 'green']

>>> E = [A, B, C]

What is the value of E[0][1]?


21

35

cat

dog

Answers

Answer:

dog

Explanation:

The python program has four lists, A, B, C, and E which is a list of the first three lists. Lists are unordered indexed data structures, it is accessed by an index starting from 0 to n (which is the length of the list minus one).

The E list is a list of lists with three list items starting from index zero to two. E[0][1] is used to access the item "dog" in the first list item of the E list.

Answer:

dog

Explanation:

i type the code in to python

The Outlook Calendar
Instruction Active
Creating an Appointment
Place the steps in order for creating an appointment in the Calendar view of Outlook 2016,
Click Save and Close
Add event details
Click New Appointment
Select the Home tab

Answers

Answer:

Select the home tab

Click new appointment

Add event details

Click save and close

Explanation:hope this helps:)

In order to create a chart, which of the following must be selected?
O Data tools
O Worksheet tab
O Data source
O Table styles

Answers

A chart is the graphical presentation of data and is a part of the data visualization. The data is represented by the symbols and bars in a bar chart.

They are often sued to show large quantities of data in a simple and understandable form. For making a chart first we need to select data tools and then design tools.

Hence the option A is correct.

Learn more about the order to create a chart.

brainly.com/question/22004535.

Operators such as >, =, <=, ===, and !== that compare values and return true or false.

Answers

Answer:

True

Explanation:

For example, if a number is greater than the other (>) the output would be true, and vice versa if the number is not greater.

Python exercise grade 10

Write a program that determines which dates comes earlier on the calendar. The user

may enter any number of dates. The user will enter 0/0/0 to indicate that no more dates

will be entered

Example:
Enter a date (month): 3

Enter a date (date): 6

Enter a date (year): 2008

03/06/2008

Enter a date (month): 5

Enter a date (date): 17

Enter a date (year): 2007

05/17/2007

Enter a date (month): 6

Enter a date (date): 3

Enter a date (year): 2007

06/03/2007

Enter a date (month): 0

Enter a date (date): 0

Enter a date (year): 0

5/17/2007 is the earliest date

Answers

earliest = ""

while True:

   month = int(input("Enter a date (month): "))

   day = int(input("Enter a date (date): "))

   year = int(input("Enter a date (year): "))

   if month == 0 and day == 0 and year == 0:

       break

   if month < 10:

       month = "0"+str(month)

   if day < 10:

       day = "0"+str(day)

   string_date = str(month)+"/"+str(day)+"/"+str(year)

   print(string_date)

   if earliest == "":

       earliest = string_date

   else:

       year,month,day=int(year),int(month),int(day)

       lst = list(map(int,earliest.split("/")))

       if year < lst[2]:

           earliest = string_date

       elif year == lst[2] and month < lst[0]:

           earliest = string_date

       elif year == lst[2] and lst[0] == month and day < lst[1]:

           earliest = string_date

print(earliest,"is the earliest date")

I wrote my code in python 3.8. Best of luck.

Pseudocode to java

Can you write this in Java program

Binary Search

Answers

Answer:

class Main {

 public static void main(String[] args) {

   int[] values = {11,12,15,16,112,118,123,145};

   int target = 15;

   int min = 0;

   int high = values.length-1;

   boolean found = false;

   int answer = 0;

   int mid;

   while(!found && min <= high) {

     mid = (min + high) / 2;

     if (values[mid] == target) {

       found = true;

       answer = mid;

     } else if (target > values[mid]) {

       min = mid + 1;

     } else {

       high = mid - 1;

     }

   }

   if (found) {

     System.out.printf("%d FOUND AT ARRAY INDEX %d", target, answer);

   } else {

         System.out.printf("%d was not found", target);

   }

 }

}

Explanation:

I altered the while expression to make the code work.

Answer: class Main {

public static void main(String[] args) {

  int[] values = {11,12,15,16,112,118,123,145};

  int target = 15;

  int min = 0;

  int high = values.length-1;

  boolean found = false;

  int answer = 0;

  int mid;

  while(!found && min <= high) {

    mid = (min + high) / 2;

    if (values[mid] == target) {

      found = true;

      answer = mid;

    } else if (target > values[mid]) {

      min = mid + 1;

    } else {

      high = mid - 1;

    }

  }

  if (found) {

    System.out.printf("%d FOUND AT ARRAY INDEX %d", target, answer);

  } else {

        System.out.printf("%d was not found", target);

  }

}

}

Explanation:

I altered the while expression to make the code work.

Which of the following is a drilling cycle available with CAM software?
Point
Straight
Through
All of the above
None of the above

Answers

Answer:

straight just like me

What is the difference between Beat and Rhythm?
A
Rhythm stays the same and steady and the beat changes
B
The beat stays the same and steady and the rhythm changes

C
There is no difference between the two
D
A beat is slow while a rhythm is fast

Answers

Answer:

I think it will option b may it help yu

Answer:

B

Explanation:

The beat stays the same and steady and the rhythm changes.

What is the first multiple of a bit

Answers

Answer:

The byte

Explanation:

which represents eight bits

3.2 code practice question 2. Not in a rush.​

Answers

Answer:

value = float(input("Enter a number: "))

if (value >= 90):

   print("Great!")

Explanation:

what does brainliest do?

Answers

Answer it gives u points I think

Explanation:

Answer:

Yeah. I think it gives u points

Explanation:

Imagine that a you and a friend are exercising together at a gym. Your friend suddenly trips and falls, and it is clear that he or she has suffered an ankle sprain. Luckily you know exactly what has happened. Explain how your friend sustained the injury and, assuming you had the necessary supplies, including a first aid kit and a phone, explain what steps could you take to stabilize your friend's injury.
Name each of the five steps in the PRICE treatment.

Answers

Answer:

The sprain happened when the friend fell and the ligaments (in the ankle)  stretched, twisted or possibly tore. Sprain is manifested by pain, swelling, bruising and inability to move.

Explanation:

Here the appropriate steps to stabilize the injury:

1.       Call for help.

2.       Rest the injured area to avoid further damage.

3.       Put ice ( for 15 to 20 minutes) to help limit the swelling.

4.       Apply compression bandage to prevent more swelling.

5.       Elevate the injured ankle above the heart to limit swelling.

Hope this helps UvU

2. Why is there no country code for the USA?

Answers

Answer:

there is a contrary

Explanation:

+1

Answer:

b cuz we dont need one

Explanation:

Ict quiz I attached a picture

Answers

Answer:

error:invalid syntax

Explanation:

heeheee

If you have a 99% and you got a 50 on a test what is the grade please I will give brainless

Answers

Answer:

you would have a C

Explanation:

depends on your other grades. you can relax, ask your teacher for extra credit

To see if a website is using a secure connection, what should you look for? Select all that apply.


A star icon to the right of the URL


"https" at the very beginning of the URL


A plus sign (+) to the right of the tab


A lock icon to the left of the URL

Answers

Answer:

– A web address using “HTTPS” (The extra “S”means it’s a secure connection. – Secure sites show a closed padlock emblem you can click on for security details – the most trustworthy sites will have green padlocks or address bars.

Explanation:

To see if a website is using a secure connection, You should look for "HTTPS" at the very beginning of the URL. The correct option is B.

What is a website?

A website is an online platform where a person put his data to show people online. Now day's everything has a website to join with the world. It is a very easy way to show your business and company online.

Due to digitalization. A website is a very necessary part of the business. And due to this, many fake websites are also made. If these websites are open, the computers may be hack on or a virus enters your computer and all the data will be stolen or removed.

To know the website is secure, always check the starting pof the website, it should be started from HTTP or HTTPs.

Thus, the correct option is B. "HTTPS" at the very beginning of the URL.

To learn more about the website, refer to the link:

https://brainly.com/question/6107621

#SPJ2

Explain any one method of creating a presentation.

Answers

Answer:

Step 1: Analyze your audience

The first step in preparing a presentation is to learn more about the audience to whom you'll be speaking. It's a good idea to obtain some information on the backgrounds, values, and interests of your audience so that you understand what the audience members might expect from your presentation.

Step 2: Select a topic

Next, if possible select a topic that is of interest to the audience and to you. It will be much easier to deliver a presentation that the audience finds relevant, and more enjoyable to research a topic that is of interest to you.

Step 3: Define the objective of the presentation

Once you have selected a topic, write the objective of the presentation in a single concise statement. The objective needs to specify exactly what you want your audience to learn from your presentation. Base the objective and the level of the content on the amount of time you have for the presentation and the background knowledge of the audience. Use this statement to help keep you focused as you research and develop the presentation.

Preparing the Content of Your Presentation

Step 4: Prepare the body of the presentation

After defining the objective of your presentation, determine how much information you can present in the amount of time allowed. Also, use your knowledge about the audience to prepare a presentation with the right level of detail. You don't want to plan a presentation that is too basic or too advanced.

The body of the presentation is where you present your ideas. To present your ideas convincingly, you will need to illustrate and support them. Strategies to help you do this include the following:

Present data and facts

Read quotes from experts

Relate personal experiences

Provide vivid descriptions

And remember, as you plan the body of your presentation it's important to provide variety. Listeners may quickly become bored by lots of facts or they may tire of hearing story after story.

Step 5: Prepare the introduction and conclusion

Once you've prepared the body of the presentation, decide how you will begin and end the talk. Make sure the introduction captures the attention of your audience and the conclusion summarizes and reiterates your important points. In other words, "Tell them what you're going to tell them. Tell them. Then, tell them what you told them."

During the opening of your presentation, it's important to attract the audience's attention and build their interest. If you don't, listeners will turn their attention elsewhere and you'll have a difficult time getting it back. Strategies that you can use include the following:

Make the introduction relevant to the listeners' goals, values, and needs

Ask questions to stimulate thinking

Share a personal experience

Begin with a joke or humorous story

Project a cartoon or colorful visual

Make a stimulating or inspirational statement

Give a unique demonstration

During the opening you want to clearly present your topic and the purpose of your presentation. Clearly articulating the topic and purpose will help the listeners focus on and easily follow your main ideas.

During the conclusion of your presentation, reinforce the main ideas you communicated. Remember that listeners won't remember your entire presentation, only the main ideas. By reinforcing and reviewing the main ideas, you help the audience remember them.

[top of page]

Practicing and Delivering

Step 6: Practice delivering the presentation

Most people spend hours preparing a presentation but very little time practicing it. When you practice your presentation, you can reduce the number of times you utter words and phrases like, "um," "well," and "you know." These habits can easily diminish a speaker's credibility. You can also fine-tune your content to be sure you make your most important points in the time alloted.

In addition to planning the content of your presentation, you need to give advanced thought to how you want to deliver it. Do you want to commit your presentation to memory, use cards to guide you, or read from a script? Or, you might want to use a combination of methods. To help you decide, read the advantages and disadvantages of the four delivery methods described below.

Speaking from Memory

A human brain.

Who am I
1.I am the law established by the intellectual property organization
2.I am an application used to illegally harm online and offline computers users
3.I am the crime through the Internet
4. I impose restrictions on incoming and outgoing information to and from networks

Answers

1. Patent law or copyright
2. Malware
3. Cybercrime
4. Firewall

Atheel tests a program and gets a NameError. How can this be fixed?

Answers

Answer:

You can't call a function unless you've already defined it. Move the def createDirs(): block up to the top of your file, below the imports.

Explanation:

Some languages allow you to use functions before defining them. For example, javascript calls this "hoisting". But Python is not one of those languages.

Answer:

B = Create a variable

Explanation:

First off to understand this question, you need to understand what a NameError is. A NameError is when a function or variable isn't valid, or is not defined. So what you need to do it make a variable that is valid/defined. Therefore the answer is B create a variable

I hope this helps!

Complete each sentence

To complete step 3, select ____ under table tools.
In step 5, each existing column is split in ____. In this table, the ____ rows cells are blank.
To use the options listed in step 9, click ____

Answer choices: first sentence (design,layout,merge) second (sixths,thirds,half) and (first,second,third) last sentence (design,layout,merge)

Answers

Answer:

Complete each sentence.

To complete Step 3, select LAYOUT under Table Tools.

In Step 5, each existing column is split in HALF In this table, the SECOND

row’s cells are blank.

To use the options listed in Step 9, click DESIGN.

Hope this helped. Please Mark me Brainliest!

brief description email etiquette​

Answers

Answer: See explanation

Explanation:

Email etiquette is defined as the code of conduct which helps to guide the behavior when people send or respond to emails. Some of ail etiquette include:

• Using proper and correct grammar and punctuations.

• Replying quickly too emails.

• Including a clear and direct subject.

• Proofreading of messages.

• Cautious with humour.

• Sending of smaller files and compressing large files.

HELP ASAP PLEASE!!!

Answers

Answer:

Click and drag the mouse to select the cells

Explanation:

Which finger types the highlighted keys?

Answers

Answer:

Index

Explanation:

The index finger lays positioned upon the 4 key.

Pointer finger. It is by columns, and your pointer finger occupy those

I NEED HELP ASAP !!What are responsibilities of entrepreneurs? Check all of the boxes that apply.
to make their own decisions and schedules
to purchase their own health insurance
to pay for office space and supplies
to follow instructions
What are responsibilities of employees? Check all of the boxes that apply.
to do their jobs using skills they were hired to use
to work a set schedule every week
to pay self-employment taxes
to follow instructions

Answers

Answer:

Question 1

to make their own decisions and schedules to purchase their own health insurance to pay for office space and supplies

Question 2

to do their jobs using skills they were hired to use to work a set schedule every week  to follow instructions

Explanation:

1. Entrepreneurs are meant to run their own affairs because they are the owners of the business. This means that they have to make their own decisions and work schedules. They also need to purchase their own health insurance as this is usually the responsibility of the company one works for.

As the owners, they will also have to pay for any space and supplies that the company needs.

2. Employees have a duty to perform in the business in such a way as to push it forward by harnessing the skills they have that got them hired. They are to work a certain schedule/amount of time every week and they are to follow the instructions of their employers.

Answer:

got it right on edge

Explanation:

Converting Denary to Binary
Work out the binary value of each denary number. Remember, any number you put a 1 under is
activated and will be added, anything with a 0 under is not activated and is not added One has been
done for you to show you how you can work it out
128
Denary
32
16
8
2
1
1
1
0
0
0
1
1
+
199
I need to make 199 out of the 8 different numbers I have across the top
I can use 128, this will leave me with 71 stil to make
I can then use 64, this will leave me with 7
can't use 16 or 8 as they won't fit into 7
I can use 4 which will leave me with 3
I can use 2 which will leave me with 1
can then use 1
I have made 199
Any number I used will be a one, numbers I didn't use are all
128
Denary
64
32
16
1
56
121
45
132
249

Answers

Answer:

Converting the numbers provided to decimal:

128: 10000000

64: 01000000

32: 00100000

16: 00010000

1: 00000001

56: 00111000

121: 01111001

45: 00101101

132: 10000010

245: 11111001

PLZ HELP What is the problem with this program?

name = "Jenny"

name = input("What is your name?")

A.
the variable name has to begin with a capital letter

B.
input should be output

C.
the first line should be omitted because the second line defines the variable

D.
the variable needs to begin with a number to distinguish it from other variables

Answers

Answer:

B

Explanation:

the answer is B imput should be output

Answer: I think the answer is (C)

I'm doing the exam rn and that what i think

Explanation:

what type of error occurred??

Answers

Answer:

Syntax Error.

Explanation:

Other Questions
(2) Using the distance formula, d = (x2 - x1)2 + (y2 - y1)2, what is the distance between point (-2, 2) and point (4, 4) rounded to the nearest tenth?5.7 units6.3 units1 unit4 units Describe how positive things can come from LOSS... the tank in Jacques' car has a capacity of 133 l of gas. he filled up at the gas station by adding 89 l to the tank. how much gas was in the tank before he filled it upa 440 gb 44 kgc 44 gd 44 l a map of Texas uses the scale of 1.5 to represent 60 miles the distance between corpus Christi to Houston is 60 miles what is the distance in inches between the cities on the map Mary decreased her time for the mile walk from 30 minutes to 24 minutes. What was the percent of decrease? How did similarities between Judaism, Christianity and Islam lead to conflict? What is the weight of a 82.1 kg object on Jupiter, where the acceleration due to gravity is 24.5 m/s2? Which factor is most important for classifying two species into the same group? A. They have a common ancestor. B. They have similar common names. C. They live in the same type of environment. D. They look very similar to each other. The availability of a commodity is referred to as itsdemand.distribution.surplus.supply. A Web music store offers two versions of a popular song. The size of the standard version is 2.8 megabytes (MB). The size of the high-quality version is 4.1MB. Yesterday, there were 1600 downloads of the song, for a total download size of 5624 MB. How many downloads of the high-quality version werethere?Number of high-quality version downloads: Read this sentence from Chapter One of Jack Londons The Call of the Wild.For two days and nights this express car was dragged along at the tail of shrieking locomotives; and for two days and nights Buck neither ate nor drank.What is a good prediction question to ask after reading this sentence?Where are the strangers taking Buck?What has caused Bucks loss of appetite?Where do the passengers ride on the train?What other cargo is the train transporting? 25 POINTS!!!This is a rather complicated question... but:What is the circumference of a circle if the radius is 9.85 (Round to the nearest 10th)Take the circumference and square it. (round to the nearest 10th)_______________________________NEW QUESTION_______________________________What is the area of a sphere if the radius is 7TYSM On the weekends, Brody teaches arts and crafts to kids. His Saturday class used a total of 45 pom-poms and 84 wooden craft sticks for the project. Now, Brody is preparing the supplies for his Sunday class. He needs 15 pom-poms. If Brody uses the same ratio of pom-poms to wooden craft sticks, how many craft sticks will he need for Sunday's class? Answer a few of these questions for crown :D Travis is an avid skier. He is trying to decide whether to buy ski equipment. Typically, it costs him $60 a day to rent ski equipment and buy a lift ticket. You can buy ski equipment for about $400. A lift ticket alone costs $35 for one day. Find the break-even point.a.4 daysb.11 daysc.6 daysd.16 days Please answer! giving brainliest ! What do Japan and China have in common? How do you think religion originated (way back in the mists of time)? Whatpurposes does it serve in societies, both past and present? Do you think religionis necessary?--in other words, could a society survive without it? whats a constant term Please help me this is hard