subject

Assignment 8: Calendar Create a calendar program that allows the user to enter a day, month and year in three separate variables. Then ask the user to select froma menu of choices using this formatting: Please enter a date Day: Month: Year: Menu: 1) Calculate the number of days in the given month. 2) Calculate the number of days left in the given year t must include the following functions: ter and returns a 1 if a year is a leap year et and O if it is not. This information will only be used by other functions umber of days: This subprogram will accept the date as parameters and return how many days are in the given monthe. the date as parameters and then calculate the number of days left in the year. This should not include the date the user entered in the count this is what I have so far:
def number_of_days(m):
if (m == 1,3,5,7,8,9,11):
woh = 31
elif (m == 2):
woh = 28
elif (m == 4,6,10,12):
woh = 30
print (woh)
print (29)

def days_left(d, m,y):
if (d > 0):
print ('135')
def leap_year(d, m,y):
if (d > 0):
print ('1')

day = int(input('Enter the day.'))
month = int(input('Enter the month.'))
year = int(input('Enter the year.'))
menu = int(input('Day in month or left in year? (1,2)'))
if (menu == 1):
monthdays = number_of_days(month)
print (monthdays)
elif (menu == 2):
dayleft = days_left(day, month, year)
print (dayleft)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:40
Peripherals are part of the main computer. true false
Answers: 3
question
Computers and Technology, 21.06.2019 22:00
Match the steps of the process to julia's analysis. 1. analyze choices. current costs for making phone calls to foreign countries averages between five and ten cents a minute. 2. determine the goals. julia needs to reduce the cost of telecommunications without reducing her employees' ability to do their jobs. 3. gather data. the corporate computer network will be able to handle the increased traffic that will occur as a result of voip. 4. evaluate the decision. julia will have her it department set up voip in the smallest domestic office. 5. make the decision. julia will have employees document the benefits and problems that result from using the new technology.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
You know the right answer?
Assignment 8: Calendar Create a calendar program that allows the user to enter a day, month and year...
Questions
question
Mathematics, 21.04.2020 17:00
Questions on the website: 13722362