Question: Q3: Leap Year Determination <8 points> Use the Gregorian approach to determine whether a given year is a leap year. Here are the conditions:

Q3: Leap Year Determination Use the Gregorian approach to determine whether a


 

Q3: Leap Year Determination Use the Gregorian approach to determine whether a given year is a leap year. Here are the conditions: Determine whether the year is divisible by 100. If it is, then it is a leap year if and only if it is also divisible by 400. For example, 2000 is a leap year, but 2100 is not. If the year is not divisible by 100, then it is a leap year if and only if it is divisible by 4. For example, 2008 is a leap year, but 2009 is not. Q4: Lucky Sum < 8 points> Write a function named lucky_sum() with no parameters. In the function, ask the user to input three int values. Given 3 int values, a b c, return their sum. However, if one of the values is 13 then it does not count towards the sum, and values to its right do not count. So for example, if b is 13, then both b and c do not count. Return the sum. lucky_sum(1,2,3) 6 lucky_sum(1, 2, 13) 3 lucky_sum(1, 13, 3) 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!