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
Arturiano [62]
3 years ago
14

In Python please:

Computers and Technology
1 answer:
sergey [27]3 years ago
6 0

Answer:

Following are the program in the Python Programming Language.

#set variable for input year by user

y=int(input("Enter year: "))

#set variable and initialize to 0

flag=0

#check condition that year is divisible by 4

if(y%4==0):

 #check that the year is divisible by 100

 if(y%100==0):

   #check that the year is divisible by 400

   if(y%400 ==0):

     #then initialized flag to 1

     flag=1

   else:

     #otherwise remain 0

     flag = 0

 else:

   flag = 1

else:

 flag = 0

#for break line

print()

#check that if flag is equal to 1

if(flag==1):

 print("29 days in February")

#otherwise else

else:

 print("28 days in February")

<u>Output</u>:

Enter year: 2020

29 days in February

Explanation:

<u>Following are the description of the program</u>:

  • Set variable 'y' in which we get integer value as year from the user.
  • Set variable 'flag' and initialize that variable to 0.
  • Then, we set if-else conditional statements to check that the variable 'y' is divisible by 4 then, we check that the variable 'y' is divisible by 100 and we also check that the following variable is divisible by 400.
  • Finally, we set if-else conditional statement to check that the variable 'flag' is equal to 1 then print about the leap year, otherwise it print about the non-leap year.
You might be interested in
To access WordPad, Jill will click on Start, All Programs, Accessories, and WordPad. To access Notepad, Karl will click on Start
NARA [144]
The answer is B, Both Jill and Karl are correct.
7 0
3 years ago
You are unpacking and setting up workstations
Anestetic [448]

Answer:

For setting up workstations in classrooms, one end of cables connected into the built in NIC and other end will be connected to a drop.

Explanation:

A drop will be used for connectivity in this case, which will work as connection point in a network. Drops are just like outlets in wall having  Ethernet Jacks where a network device or system can be plugged into it.

8 0
3 years ago
How do you convert a decimal to binary?
lidiya [134]
B. repeatedly divide the decimal number by 2
7 0
3 years ago
Read 2 more answers
What is a relational database management system and how does it relate to a database administrator?
nydimaria [60]

Answer: A database management system tends to support administration, development, and use of the platforms. A Relation Database Management System (RDBMS) is referred to as a type of Database Management System (DBMS) that consists of a structure(row-based table) that tends to connect data elements and also involve functions that are supposed to maintain accuracy, security, consistency and integrity of the data.

6 0
4 years ago
What is the name of a statement written to retrieve specific data from a table?
Shkiper50 [21]
The answer is b.record
4 0
3 years ago
Other questions:
  • Suppose the program counter (pc) is set to 0x2000 0000. is it possible to use the jump (j) mips assembly instruction to set the
    15·1 answer
  • Two of the goals of community mobilization are getting the community interested and
    6·1 answer
  • A file containing user information which is transmitted from an online server and attached to your web browser and stored on you
    11·1 answer
  • Write a program in main.c that reads the file lorum.txt and counts the number of characters on each line. Your program should cr
    5·1 answer
  • You have created shared folders for all your companies departments and assigned the appropriate permissions. everyone can access
    8·1 answer
  • Write a method named circleArea that accepts the radius of a circle as a parameter (as a real number) and returns the area of a
    12·1 answer
  • Write a line of code to convert time to hours. Remember there are 60 minutes in an hour. Then write a line of code to calculate
    9·2 answers
  • 1. I am a rectangle in a flowchart. What do I represent?
    5·1 answer
  • C++Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    8·1 answer
  • guys im so heartbroken. so i quit art. heres my laST piece of art i did. it took me a month. im burning it tonight. i quit art..
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!