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
jeka94
3 years ago
8

In this challenge, write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the

truncated float value, i.e. anything after the decimal point is dropped. For instance, floor(1.1 + 3.05) = floor(4.15) = 4.
Computers and Technology
1 answer:
Wewaii [24]3 years ago
5 0

Answer:

def floor_sum(number1, number2):

   total = number1 + number2

   if total >= 0:

       return int(total)

   else:

       return int(total) - 1

   

print(floor_sum(1.1, 3.05))

Explanation:

*The code is in Python.

Create a function called floor_sum that takes two parameters, number1 and number2

Sum them and set it to the total

Check if the total is positive number or 0, return the integer part of the total. Otherwise, subtract 1 from the integer part of the total and return it.

Call the function with given parameters in the question and print the result

Note that if the result is a negative value like -5.17, the floor of the result is -6 not -5.

You might be interested in
Your friend is overspending and in need of a budget. What type of expense should they reduce next month?
dangina [55]
<span>The correct answer is to reduce the spending of going out to watch a movie with friends, since all of the other choices are a need and watching a movie with friends is just a want. One should learn how to prioritize one's needs before his or her wants.</span>
7 0
3 years ago
Read 2 more answers
Match each method of communication with its intended purpose.
Scorpion4ik [409]

Answer:

1. a late breaking news story = to inform

2. a poetry reading = to entertain

3. an advertisement = to persuade

4. a small group assignment = to collaborate

Explanation:

1. A "breaking news" tells people of what is happening in the society. It <em>informs </em>them of the occurrence of an important event such as the plane crash of Kobe Bryant.

2. Poetry reading is meant to touch the attention of listeners. It tries to entertain them through the poem's interesting verses.

3. An advertisement is being shown/displayed in order to convince people to buy a particular product or service.

4. A group assignment allows the members of the group to contribute their ideas together. Such situation is known as "collaboration." They try to brainstorm together towards a common goal.

7 0
3 years ago
_____ create computer programs by using their knowledge of computer science, math, and other disciplines.
zimovet [89]
B.) Software designers
5 0
3 years ago
What computer company was founded in 1975?
erica [24]
Microsoft company was founded in 1975
6 0
3 years ago
How do you recognize substances that have gone through physical or chemical changes?
Leviafan [203]
Normally  you can't.   You cannot tell if water has been frozen and then thawed.
7 0
3 years ago
Read 2 more answers
Other questions:
  • How do you convert a decimal to binary?
    9·2 answers
  • Find some search engine as many that you can find
    9·1 answer
  • An example of a current disruptive technology is a?
    8·2 answers
  • Rachel wants to post content from digital cameras on the web. Which online tool will help Rachel to post and edit content on a w
    5·1 answer
  • Sean works for a company that ships hospital equipment. He needs to calculate the weight of the items being shipped. He enters t
    12·1 answer
  • Module 1 and 2 Coding Guided Notes Fill in your answers to each response as you read through the lesson pages in the coding cour
    11·2 answers
  • Lily obtained data from five trails 50 kcal 72 kcal 12 kcal and 50 kcal which best decribes her data
    11·1 answer
  • In this exercise, you'll raise a manual exception when a condition is not met in a particular function. In particular, we'll be
    10·1 answer
  • Write a recursive decent algorithm for a java while statement, a Javas if statement , an logical/mathematical expression based o
    5·1 answer
  • your manager asked you to set up a secure network connection at a remote site to move over some back ups. what protocol what do
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!