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
You're setting up some VMs to test an application you're considering making available to employees of the small company you work
Alex777 [14]

Answer:

b. Client Hyper-V

Explanation:

5 0
3 years ago
Which tool uses images and other visual elements to provide artistic
timofeeve [1]

Two of the tool that uses images as well as other visual elements are;

Adobe Illustrator and Adobe Photoshop.

<h3>What are tools for designing?</h3>

Designing tools are the software that is been use to provide artistic inspiration  and used for different purpose of design.

These tools are very interesting and they provide artistic inspiration to programmers who are designing a program.

Learn more about tools at:

brainly.com/question/11013757

3 0
3 years ago
4. Assume you have a list of numbers
navik [9.2K]

lst = [12,10,32,3,66,17,42,99,20]

a)

for x in lst:

   print(x)

b)

for x in lst:

   print(str(x) + " " +str(x**2))

I think this is what you're looking for. Hope this helps!

5 0
3 years ago
Why are packets useful?
Novosadov [1.4K]

I think that, <span>A. They allow a large amount of data to be transferred in one package, without splitting up the data, Is the answer.</span>

3 0
3 years ago
Read 2 more answers
It is against the law for drivers to use a wireless communication device while driving
Murrr4er [49]

Answer:

The statement is TRUE.

<h3>It is against the law for drivers to use a wireless communication device while driving.</h3>

Explanation:

  • Wireless Communication devices are nowadays one of the biggest causes of road accidents.
  • Using hand held or hands-free devices like mobile phones while driving is restricted strongly in the law. These laws may subject to primary and secondary enforcement by the authority.
  • Different states have passed laws concerning this scenario for different kinds of drivers and different devices accordingly.
  • Talking the scenario as a safety precaution to control road accidents one should try not to use communication devices while driving so that he/she may concentrate on the road properly.

<h2>I hope it will help you!</h2>
7 0
3 years ago
Other questions:
  • Many people blame online shopping for the demise of the high street. Discuss why high street shops find it difficult to compete
    12·1 answer
  • Cover page styles in the cover page gallery match the preformatted styles in word, making it easier to create a coherent style b
    5·1 answer
  • Text that does not fit in a cell
    7·1 answer
  • Which of the following is a central feature of agroup?interactionmutual influenceinterdependenceall of the given options
    10·1 answer
  • What does DOS stand for?
    15·1 answer
  • Which type of evidence should victims collect to help officials catch cyber bullies
    9·2 answers
  • which artists work provides visual effects to enhance the action of an animated movie , film, or video
    11·1 answer
  • How is an API different from a web application?
    10·1 answer
  • Plsss help me plsssssss
    11·1 answer
  • someone please do this for and send a screeshot or picture please its really important for my examsss :D​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!