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
zalisa [80]
2 years ago
14

Write a function, daysbetween, which return an integer represneting the number of days between two dates

Social Studies
1 answer:
Varvara68 [4.7K]2 years ago
3 0

The function that performs the above task is indicated below. See the definition a function in programming.

<h3>What is a function?</h3>

A function is essentially a "chunk" of code that you may reuse instead of writing it out several times.

Programmers can use functions to break down or breakdown an issue into smaller segments, each of which performs a specific purpose.

<h3>What is the function that performs the task above?</h3>

# numdaybetween function defined

def NumDaysBetween(y1,m1,d1,y2,m2,d2):

     # returns the days between 2 dates

     return (y2-y1)*365 + (m2-m1)*31 + (d2-d1)

# calling function

print("Days between:",NumDaysBetween(2009,5,1,2011,5,1))

print("Days between:",NumDaysBetween(2011,5,1,2012,6,12))

Learn more about functions;
brainly.com/question/25638609
#SPJ1

You might be interested in
What is the most pressing challenge facing Middle East in terms of its water supply?
worty [1.4K]
It is general scarcity.

4 0
3 years ago
Read 2 more answers
Experiments in which all variables are identical except for one are called _____ experiments.
Liula [17]
<span>Experiments in which all variables are identical except for one are called controlled experiments. This where an observer tests his hypothesis by looking on changes that were brought about by one variable. The results are always dependent on one adjusted variable.</span>
4 0
3 years ago
Read 2 more answers
United States wanted the Louisiana Territory?
Naddika [18.5K]

Answer: Why did Thomas Jefferson want to purchase the Louisiana Territory? (1 point) He wanted to ensure Americans’ trade rights on the Mississippi. Eastern seaports needed more competition. The Louisiana residents would add diversity to the United States.

Explanation: yaaaaaahhhh

6 0
3 years ago
Most traits are a function of the interaction of multiple genes, known as ______.
Stels [109]

Answer:

polygenic trait

Explanation:

4 0
2 years ago
Who freed the Greek cities in Asia Minor from Persian rule?
MrRa [10]
The correct answer here is Alexander the Great. He was one of the best generals in history of war and was a general who conquered a good portion of the Middle East and who drastically expanded the Greek empire under one banner. 
5 0
3 years ago
Read 2 more answers
Other questions:
  • Devon worked for a major corporation for 20 years but recently switched jobs because she wanted to make a larger contribution to
    15·1 answer
  • Jake, 18 years old, understands the physics of why a high-speed object goes off track on a curve. regardless, he told his friend
    8·1 answer
  • What role did the steamboat play in the growing nation?
    6·2 answers
  • 1. The article says that Joe Biden "is no stranger to the White House." What does
    10·1 answer
  • What do the current borders separating African countries from one another generally reflect?​
    5·1 answer
  • Who does Lewis believe was most helpful to his mission?
    11·1 answer
  • What were the routes that connected markets in different cities called?
    14·1 answer
  • Where is bihar?<br>answer in hindi​
    11·1 answer
  • Diwali, the festival of lights, is a holiday in which religion? A. Islam B. Christianity C. Buddhism D. Hinduism.
    7·1 answer
  • In three to five sentences, explain how industry led to and supported urbanization.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!