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
Ratling [72]
2 years ago
15

Write a program for determining if a year is a leap year. In the Gregorian calendar system you can check if it is a leaper if it

is divisible by 4 but not by 100 unless it is also divisible by 400.
Computers and Technology
1 answer:
SOVA2 [1]2 years ago
8 0

Answer:

def leap_year_check(year):

return if int(year) % 4 == 0 and (int(year) % 100 != 0 or int(year) % 400 == 0)

Explanation:

The function is named leap_year_check and takes in an argument which is the year which we wish to determine if it's a new year or not.

int ensures the argument is read as an integer and not a float.

The % obtains the value of the remainder after a division exercise. A remainder of 0 means number is divisible by the quotient and a remainder other wise means it is not divisible by the quotient.

If the conditions is met, that is, (the first condition is true and either the second or Third condition is true)

the function leap_year_check returns a boolean ; true and false if otherwise.

You might be interested in
The two key elements of any computer system are the ________ and the ________.
mezya [45]
The second the hardware and the software
5 0
3 years ago
#include
Aloiza [94]

Answer:

#include<studio.h>

#include<conio.h>

void main()

{

char ch;

printf("Enter any letter");

scanf("%c",&ch);

3 0
3 years ago
Which of the following statements about cover letters is false?
zzz [600]
Among the choices given, the one that is considered false is <span>c. A cover letter is sent before a résumé so that the employer knows it is coming. This is because a cover letter is sent along with the applicant's resume. The cover letter is an optional message to the employer before he/she reads the resume. A cover can convey a person's personality, skills, and abilities.</span>
6 0
3 years ago
Read 2 more answers
The basic functions of Brake Control Valves is?
GrogVix [38]

Answer:

This valve is necessary for optimizing front-to-rear bias, also referred to as brake balance. It is a spring-loaded component that activates when fluid pressure builds when you step on the brake pedal. Then, the valve's plunger unseats and fluid rushes into the calibrated range.

3 0
3 years ago
Smaller applications, such as at home, typically use a powerful, expensive server to support their daily operations.
snow_tiger [21]
False.
Smaller applications such as at home, sometimes use a high-end desktop as a server. Larger corporate, government, and internet applications use powerful, expensive servers to support daily operations.
hope this helps!
3 0
2 years ago
Other questions:
  • Which of the following is not a basic role of a webmaster
    8·1 answer
  • ____ are programs that need to be attached to other files to install themselves on computers without the users’ knowledge or per
    5·1 answer
  • Which devices typically generate computer output ?
    8·2 answers
  • In Microsoft Word, when you highlight existing text you want to replace, you're in
    7·1 answer
  • Plis is a unit test !!!!!!! HelP ASAP only 30 mins left, will mark as brainliest
    8·1 answer
  • Write a new program indent.cpp that enhances the program from the previous task. As it reads the input line by line, it should a
    10·1 answer
  • Diligent people are as concerned with the ____ as the ___ of their work
    12·1 answer
  • Edhesive code practice 4.8 Question 3
    5·2 answers
  • Which factor is NOT used to determine who can be let go during a downsizing?
    8·2 answers
  • How could an online college utilize enterprise software? A. Develop new technical support jobs B. Improve course resources and n
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!