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
Which of the following correctly stores 45 squared in the variable x?
timama [110]

Answer:

x = 45

x = x ** 2

6 0
3 years ago
What command can be used to export an nps backup file named npsconfig.xml that can be used to restore nps configuration on anoth
irakobra [83]

The command is Export-NpsConfiguration    

An admin can export the entire NPS configuration from one NPS for import to another NPS. Standard precautions should be taken when exporting NPS configurations over the network. The command syntax that can be used for exporting the NPS configurations is Export-NpsConfiguration –Path <filename>


3 0
3 years ago
What is the primary uses of cell phone
den301095 [7]

Some primary uses of cell phones include, keeping in touch with friends or family. As well as communicating to work and to have in the event of an emergency.

8 0
3 years ago
Read 2 more answers
Decomposition is
Allushta [10]

Answer:

breaking a problem into smaller parts

Explanation:

In language of computer science, decomposition is the process in which complex problems are divided into simpler parts. These simpler parts helps in the solving of the complex problems. They are made easier and comprehensible for the user to understand. Each simple part is further analyzed separately and the solution of the complex issues are derived.  The process becomes lengthy but the solution is found.

8 0
3 years ago
A large retailer is asking each customer at checkout for their zip code. if the zip code is the only recorded variable, what is
Varvara68 [4.7K]

Answer:

Nominal

Explanation:

  • So while singing the question, let's further move to the answer. So let's see here and there.
  • The first option is B. S, which corrects gross sectional data, And the 2nd 1 of Nominal, C. Is correct nominal. So here are the buddha points which are given in the question.
  • The first one, option B is correct cross-sectional data, And the 2nd 1, is option C. Is correct nominal.

To learn more about it, refer

to brainly.com/question/25458754

#SPJ4

7 0
2 years ago
Other questions:
  • Data mining is defined as: a)Separating data and programs such that each can be changed without changing the other b)Allowing ma
    5·1 answer
  • Question 16 (2 points) Question 16 Unsaved
    11·1 answer
  • PLEASE HELP ASAP! WILL MARK BRAINLIEST IF THE ANSWER IS CORRECT! I NEED HELP WITH THE 3RD ONE!
    13·1 answer
  • Please help me complete this task for ICT! Its about Hardware and Software
    12·1 answer
  • If we can lock a file, we can solve the race condition problem by locking a file during the check-and-use window, because no oth
    14·1 answer
  • Which command would you use to swap the words hither and yon on any line with any number of words between them? (You need not wo
    5·1 answer
  • Write an algorithm and draw a flowchart for switching off a machine after it has made 500 glass bottles. use an appropriate cond
    10·1 answer
  • Note oj cyber security​
    6·1 answer
  • How do you remove management from your chrome book [administrator]
    12·1 answer
  • Draw
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!