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]
3 years ago
10

Edhesive assignment 7 calendar

Computers and Technology
1 answer:
ikadub [295]3 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
The U.S. is a major player in the global media domain. However, other nations play a role in creating a dominant ideology, as ev
poizon [28]

Answer:

The answer is "Authorization for mobile wiretaps on American citizens."

Explanation:

  • The term media includes advertising, documentaries, painting, and graphic, which allows you to use a blog's domain name, and it can also provide you to create a fake profile.
  • In certain countries, a prevailing philosophy is performed, as demonstrated by the prevalence of telecommunications wiretaps approved in Sweden by US residents.
6 0
3 years ago
50 points for each person brainless goes to the best answer
wolverine [178]

Technical writing is writing that is done for the purpose of educating, informing or directing someone on how to do something. Technical writing is significantly different than other types of writing such as narrative, because technical writing is intended to impart to the reader some specific skill or ability. Technical writing isn't for everyone. It is often very detail-oriented and usually involves writing within fields where some advanced knowledge is required. When given a technical writing assignment, it also must be approached in a certain way in order for you to be successful. but i would have to go with c- e commerce

6 0
3 years ago
Read 2 more answers
What is the benefit of using pre-programmed functions to analyze data?"
Murrr4er [49]

Answer:

A pre-programmed function is a section of code which is reusable to perform certain routine. One benefit of using a pre-programmed function to analyze data is the code redundancy can be reduced. The function is only written for once and it can be called to perform a specific data analysis whenever it is needed.

Besides, a pre-programmed function also offer consistent analytical output as all data are processed by a same analytical procedure in the function.  

5 0
3 years ago
_______ software helps run the computer and coordinates instructions between other software and the hardware devices. select one
Mila [183]
'SYSTEM' <span> software helps run the computer and coordinates instructions between other software and the hardware devices.</span>
5 0
3 years ago
Which of the following are slide layouts in
hjlf

Answer:

title slide

title and content

blank

picture with caption

Explanation:

Slide layouts contain boxes known as placeholders that bear the contents of a slide. They allow users to format, and position content. Colors and fonts are also available. Text, titles, pictures, video, audio, graphics, etc., can be attached to the placeholders. Layouts are adjustable according to the preferences of the user.

There are also features that the sharing of these layouts with other users. To select a layout to be used, the user goes to Home and chose Layout which then supplies the different options.

5 0
3 years ago
Other questions:
  • Jesse is writing a physics quiz about the motion of a roller coaster cart. He has a clip art illustration of a cart rolling hori
    9·2 answers
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • The picture that graphically represents the items you use in windows is called a/an
    5·1 answer
  • Karen took an assessment with 291 questions, and it described her preferred style of working, learning, leading, risk-taking and
    13·1 answer
  • What would be an ideal scenario for using edge computing solutions?
    10·1 answer
  • ---------------------- use of the Internet to access programs and data on computers that are not owned and managed by the user o
    9·1 answer
  • Every single device can be connected to every other device on network, making the network mesh. This statement is True or False?
    8·1 answer
  • Olivia wants to change some settings in Outlook. What are the steps she will use to get to that function? open Outlook → File →
    7·2 answers
  • How to write the algorithm to calculate the square of five numbers
    14·2 answers
  • A client is looking to maximize value from its Cloud investments by baselining, profiling, and prioritizing its human capital ne
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!