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
1. One of the descriptions of the economic concept of mercantilism is described as, "a country builds wealth by exporting more g
Nana76 [90]

Answer:

false

Explanation:

8 0
3 years ago
Over what three continents did Caesar conduct his campaigns
Inga [223]
Yes. Caesar<span> again took a big risk, for he </span>was<span> accompanied by only one of </span>his<span> legions</span><span>—about 3,000 to. 6,000 men, plus cavalry. Although Pompey's forces were nearly twice as large, </span>Caesar<span> defeated them. He continued to </span>conduct<span> successful military </span>campaigns<span> in Egypt, the Middle East, Africa, and Spain. Hope this helps :))</span>
4 0
3 years ago
I have a question about civics.
4vir4ik [10]
The federal government is the best government for people and sovereign nations because the federal government is divided into three branches these are the legislative, the executive and the judicial branch. Each branch has its own rights and powers which are meant to check and balance the powers of each other branch.
6 0
2 years ago
In what way does the federal government work with the state governments?
atroni [7]
State<span> & Local </span>Government<span>. Powers not granted to the </span>federal government<span> are reserved for </span>states<span> and the people, which are divided between </span>state<span> and local</span>governments<span>. ... All </span>state governments<span> are modeled after the </span>federal government<span>and consist of three branches: executive, legislative, and judicial.</span>
7 0
4 years ago
Which event was Japan’s attempt at keeping the US out of WWII?
Rashid [163]
D Pearl Harbor because if they knocked out as many ships as possible they wouldn’t be able to fight in wwll
8 0
3 years ago
Other questions:
  • In his stress theory, richard lazarus says that "daily hassles" cause stress. which is a cause of hassles according to lazarus
    13·1 answer
  • All civilizations that lived by the Nile river were the same true or false
    10·1 answer
  • What is the central idea in the nonfiction piece, "Artful Research"?
    7·1 answer
  • All of the following are quotations from people fulfilled by their careers except: A. "I am challenged by my work." B. "I put in
    9·1 answer
  • Steven left his home abruptly without taking any of his belongings. He relocated to a nearby town. Several months later, he retu
    5·1 answer
  • How populated is moscow explain your reasoning.
    5·1 answer
  • Winds remove fine particles of materials in desert regions by the process of Running water.
    15·2 answers
  • List out two other social problem or evils prevailing in your society not mentioned in the lesson.​
    14·1 answer
  • You measure the height of four- and five-year-olds. To your surprise, you find no statistically significant correlation between
    15·1 answer
  • A client has an impairment of cranial nerve ii. to maintain safety in the home, the nurse should teach the spouse to implement w
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!