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
Ksju [112]
2 years ago
10

Edhesive assignment 7 calendar

Computers and Technology
1 answer:
ikadub [295]2 years ago
5 0

Answer:

def leap_year(y):

 if y % 4 == 0:

     return 1

 else:

     return 0

def number_of_days(m,y):

 if m == 2:

     return 28 + leap_year(y)

 elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:

     return 31

 elif m == 4 or m == 6 or m == 9 or m == 11:

     return 30

def days(m,d):

 if m == 1:

     return 0 + d

 if m == 2:

     return 31 + d

 if m == 3:

     return 59 + d

 if m == 4:

     return 90 + d

 if m == 5:

     return 120 + d

 if m == 6:

     return 151 + d

 if m == 7:

     return 181 + d

 if m == 8:

     return 212 + d

 if m == 9:

     return 243 + d

 if m == 10:

     return 273 + d

 if m == 11:

     return 304 + d

 if m == 12:

     return 334 + d

def days_left(d,m,y):

 if days(m,d) <= 60:

     return 365 - days(m,d) + leap_year(y)

 else:

     return 365 - days(m,d)

print("Please enter a date")

day=int(input("Day: "))

month=int(input("Month: "))

year=int(input("Year: "))

choice=int(input("Menu:\n1) Calculate the number of days in the given month.\n2) Calculate the number of days left in the given year.\n"))

if choice == 1:

 print(number_of_days(month, year))

if choice == 2:

 print(days_left(day,month,year))

Explanation:

Hoped this helped

You might be interested in
Who was the father of computer​
masya89 [10]

Answer:

elon musk

Explanation:

8 0
3 years ago
What technique is used when setup times at a workstation are sequence dependent?
grigory [225]

Answer:

johnsons rule minimizes total idle time for both machines or work centers. What technique is used when setup times at a workstation are sequence dependent? determine the total time of each job sequence permutation considering the setup time and choose the best (lowest) time.

Explanation:

please mark me as brainliest thank you

3 0
3 years ago
Which of the following internet protocols is used to request and send pages and files on the World Wide Web
Marianna [84]

it is . org Explanation:

7 0
2 years ago
I need to code a simple racing game in c++. Help, please. ​
QveST [7]
Can you attach what you have so far
8 0
2 years ago
In a relational database, a ____ would ensure that two customers with the same name don’t get confused with each other.
earnstyle [38]

Answer: Primary key

Explanation: Relational databases are those databases which are commonly found in the form of tables . It works in the relation pattern for accessing the data in the database

Primary key is a major factor which is found in the relational databases for the identification of the data in the table's column.It is considered as the unique value that corresponds to the values of rows in the table of relational database.

6 0
3 years ago
Other questions:
  • Which css property configures the capitalization of text?
    12·1 answer
  • Which shortcut brings up the Print screen?
    10·2 answers
  • WHERE WAS THE CHEESEBURGER INVENTED?
    9·1 answer
  • Once artwork is inserted into a placeholder, it can be moved around on a slide. True False
    9·1 answer
  • A software process describes the interrelationship among the phases by expressing their order and frequency, but does not define
    14·1 answer
  • Lazarus Consulting is a large computer consulting company in New York. Pete Lazarus, theà CEOà and founder, is well known for hi
    8·1 answer
  • Me inculparon de crear una cuenta en Facebook y colocaron el barrio donde vivo, ¿cómo podría demostrar lo contrario? Ayuda urgen
    6·1 answer
  • Which of the following is true of horror films like Insidious and The Conjuring?
    15·2 answers
  • Im a beginner programmer. what languages should i learn and how do i get better
    13·1 answer
  • When one loop appears inside another, the loop that contains the other loop is called the ____ loop. Group of answer choices ind
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!