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.
The one that best describes the procedural or imperative, programming paradigm as it uses a linear, top-down approach to solving problems. The correct option is D.
<h3>What is a linear approach?</h3>
It describes a method of programming where an application is created by first defining at a high level what it should be able to accomplish, then breaking that down into smaller and smaller sections.
Without going into specifics about any of the system's components, the top-down model presents an overview of the whole. The definition is then progressively improved, detailing each element in more detail until it is complete enough to validate the model.
Therefore, the correct option is D. It uses a linear, top-down approach to solving problems.
To learn more about programming paradigm, refer to the link:
brainly.com/question/17150647
#SPJ1
Answer:
Explanation:
The reasons why a language would distinguish between uppercase and lowercase in its identifiers are:
(1) So that variable identifiers may look different than identifiers that are names for constants, such as the convention of using uppercase for constant names and using lowercase for variable names in C.
(2) So that the catenated words such as names can have their first letter distinguished, as in Total Words. The primary reason why a language would not distinguish between uppercase and lowercase in identifiers is it makes programs less readable, because words that look very similar are actually completely different, such as SUM and Sum.
I think that its C. Report the issue to the teacher.