A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are:
1) If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2) If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3) If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4) The year is a leap year (it has 366 days).
5) The year is not a leap year (it has 365 days).
Some example leap years are 1600, 1712, and 2016.
Write a program that takes in a year and determines whether that year is a leap year.

Answers

Answer 1

Answer:

The program in Python is as follows:

year = int(input("Year: "))

print(year,end=" ")

if (year % 4) == 0:

  if (year % 100) == 0:

      if (year % 400) == 0:

          print("is a leap year")

      else:

          print("is not a leap year")

  else:

      print("is a leap year")

else:

  print("is not a leap year")

Explanation:

This gets input for year

year = int(input("Year: "))

This prints the year, input by the user

print(year,end=" ")

Check if year is divisible by 4 --- step 1

if (year % 4) == 0:

If step 1 is true, check if year is divisible by 100 -- step 2

  if (year % 100) == 0:

If step 2 is true, check if year is divisible by 400 -- step 3

      if (year % 400) == 0:

If yes, print leap year --- step 4

          print("is a leap year")

      else:

If otherwise, print not leap year --- step 5

          print("is not a leap year")

If step 3 is not true, print leap year

  else:

      print("is a leap year")

If step 1 is not true, print not leap year

else:

  print("is not a leap year")


Related Questions

I need someone to explain gor me python coding!

Answers

Answer:

Explanation:

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general purpose language, meaning it can be used to create variety of different programs and isn't specialised for any specific problems

what is the role of media in our society, and how can we become responsible consumers producers of news and information in the digital age?​

Answers

1.Own your image, personal information and how these are used.Pay close attention to the 2.Terms of Use on apps and websites. ...

3.Obtain permissions when posting videos or 4.images of others on your networks. ...

Scrub your accounts. ...

5.Password diligence. ...

Spread love, not hate.

Marco travels often and does not have consistent wireless Internet service. He frequently uses his mobile phone service to provide Internet access to his tablet.

Which network type is Marco using?


LAN


PAN


WAN


MAN

Answers

Answer:

PAN

Explanation:

For wireless devices like laptops, tablets, wireless desktops, and cellphones to communicate, a wireless LAN normally has a Wi-Fi router or wireless access point. A wireless LAN is essentially a LAN that doesn't use cables. Thus, option B is correct.

What are the PAN  network type is Marco using?

The computer network that links computers and other devices within a specific person's range is known as a personal area network (PAN). PAN stands for personal area network and gives a network range within a person's range, often within a range of 10 meters (33 feet).

A PAN is a network that primarily serves a tiny space, usually a single small room. It allows computer devices to share data and information with other nearby computers.

Therefore, Whereas in LAN, computers are connected via a network over a short distance, such as within a building, or in a single computer network made up of several computers.

Learn more about network type here:

https://brainly.com/question/29515062

#SPJ2

Which terms means device that converts one voltage to another ?

Answers

Answer:

I believe it is an adapter

Explanation:

An adapter or adaptor is a device that converts attributes of one electrical device or system to those of an otherwise incompatible device or system. Some modify power or signal attributes, while others merely adapt the physical form of one connector to another.

Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of the array:
newArray DWORD 10,20,30,40,50
a) arraysize=(S-newArray)
b) arraysize#(S-new,Array)/2
c) arraySize- (S-newArray)/4
d) arraySize- (S-arraySize)

Answers

Answer:

ArraySize = ($ - newArray)

Explanation:

Given

Array name: newArray

Type: DWORD

Required

The size of the array in bytes

The following formula is used to calculate the size of an array in assembly language.

Variable = ($-Array name)

So, we have:

ArraySize = ($ - newArray)

Where ArraySize is the variable that holds the size of newArray (in bytes)

31. Explain what the program does. Write out the output 20 PRINT "Hellooo00000000000, world!" 30 PRINT "I'm learning about commands in BASIC." 40 PRINT 'This text is being printed via the PRINT commarrd. 2 209​

Answers

o_num = input ("Please enter the amount of \"o\": ")

zero_num = input ("Please enter the amount of zeros: ")

i = 0

while i < o_num and i < zero_num:

repeat_o = "Hell" + o_num

repeat_zero = repeat_o + zero_num

i+=1

print (repeat_zero)

You have two microservices that need to communicate with each other without holding up a thread on either end. One service will receive an ID and return a message once the job is complete.
Which communication framework should be used?
A.) Have a shared database that allows both
applications to read and write to the tables to share the data instead of having to communicate
B.) Use asynchronous messaging to send and receive messages between each microservice
C.) Abandon the microservice architecture so no interaction is needed
D.) Create a third service to handle the interaction between the services
E.) Use a RESTful architecture for both, send the ID through a POST, and ping the service with a GET until a response is available

Answers

Answer: E. Use a RESTful architecture for both, send the ID through a POST, and ping the service with a GET until a response is available.

Explanation:

Since there are two microservices that need to communicate with each other without holding up a thread on either end, the communication framework should be used is a RESTful architecture for both, send the ID through a POST, and ping the service with a GET until a response is available.

REST is a software architectural style which is used in defining the set of rules that be used for the creation of web services. The REST architecture allows requesting systems to be able to access and manipulate web resources.

In the right situations, the use of multi-threads can allow for application speedup. Provide a small code example that illustrates how threads can be used to arrive at an appropriate result. Identify if there is a point where too many threads might impact performance of the application. g

Answers

Answer:

Explanation:

Threads allow an applications to run faster because they allow various tasks to run at the same time instead of doing one at a time and having to wait for one to finish before starting the next task. However, if too many threads are running at the same time, or a thread has a very large task or requires another task to finish before finishing its own then this can drastically impact performance. Mainly because too many resources are being used at a single moment. The following code is a small example of how threads work in Python.

import threading

import time

def thread_function(name):

   print("Thread {name}: starting")

   time.sleep(2)

   print("Thread {name}: finishing")

thread1 = threading.Thread(target=thread_function, args=(1,))

thread1.start()

time.sleep(1)

thread2 = threading.Thread(target=thread_function, args=(2,))

thread2.start()

thread2.join()

If every company is now a technology company, then what does this mean for every student attending a business college

Answers

Answer:

Explanation:

There are all sorts of possibilities for, say, inserting new technologies into existing processes. But most of these improvements are incremental. They are worth doing; in fact, they may be necessary for survival. No self-respecting airline, for instance, could do without an application that lets you download your boarding pass to your mobile telephone. It saves paper, can't get lost and customers want it.

But while it's essential to offer applications like the electronic boarding pass, those will not distinguish a company. Electronic boarding passes have already been replicated by nearly every airline. In fact, we've already forgotten who was first.

https://ref.surveyj.co/Oware111​

Answers

What is the link?

IS IT A HACKING LINK

Output is the act of is the act of entering the data to the computer?​

Answers

Answer:

Output is the act of the computer display information based on your input

Explanation:

Funny thing is that output is the exact opposite of what you just described

A technique that uses data that is labeled to train or teach a machine.
Reinforcement
Unsupervised
Supervised

Answers

Answer:

computer.

Explanation:

it uses data that is labeled to train.

What Internet access method would be suitable for a business requiring a high bandwidth connection where no cabled options exist?

Answers

Answer:

Fiber Optic, it allows for speeds up to 1200 mbps

Explanation:

Identify the statement about Windows tasks that is FALSE.


To launch an application, click the Windows icon, select "All Programs," and then click an application.


The boot process is the process for powering off a computer.


A common way to shut down the computer’s operating system is by using the Start menu.


Users log into their accounts on the Welcome screen, before Windows is ready to use.

Answers

The statement about Windows tasks that is FALSE is

The boot process is the process for powering off a computer.

According to the question, we are to discuss about Windows tasks and how it works as regards to the computer.

As a result of this we can see that  in launching an application;

we need to click on Windows iconselect "All Programs," click an application.

Therefore, The boot process is not the process for powering off a computer.

Learn more about Windows tasks .

https://brainly.com/question/1594289

The statement that is false is: The boot process is the process for powering off a computer, which is the second option. The boot process is actually the process of starting or powering on a computer, not powering it off.

The boot process refers to the sequence of events that occur when a computer is powered on or restarted. It is the process of starting up the computer's hardware and loading the operating system into memory so that it is ready for use. During the boot process, the computer's firmware (such as the BIOS or UEFI) performs a series of checks and tests to ensure that the hardware components are functioning correctly. It then searches for the operating system on connected storage devices, such as the hard drive or solid-state drive, and loads it into memory.

Learn more about the boot process here.

https://brainly.com/question/24355262

#SPJ6

Consider the following JavaScript code fragment:var greeting = function ( name ) {console.log ( name )}The best answer for what is wrong with this code is:Group of answer choices

Answers

Answer:

name is a reserved word in JS and cannot be used as an identifier

Explanation:

From the group of answer choices provided the only one that may be a problem would be using the word name as a parameter. Although name is not a reserved word per say in JS it is in HTML, and since JS targets HTML it could cause some errors. This however does not prevent this code from running correctly. JS does not require semicolons anymore, and the opening and closing braces for a body of code does not need to be on their own lines. Also, variable names are not Strings and do not need to be inside quotes, even for console.log()

A network administrator needs 10 prevent users from accessing the accounting department records. All users are connected to the same Layer 2 device and access the internal through the same router. Which of the following should be Implemented to segment me accounting department from the rest of the users?

a. Implement VLANs and an ACL.
b. Install a firewall and create a DMZ.
c. Create a site-to-site VPN.
d. Enable MAC address filtering.

Answers

Answer:

C

Explanation:

definitely C you’re welcome

Give three reasons to use a hard drive as mass storage.

Answers

Answer:

With that in mind, let's take a look at five places where hard drives shine.

Backups and Archives. ...

Media Libraries. ...

Large Capacity Storage. ...

NAS Drives and Security. ...

RAID Arrays. ...

Other Uses.

__________ makes the hardware usable, while __________ commands it to perform specific tasks. a.) The operating system, RAM b.) The CPU, RAM c.) The application software, the hard disk d.) The operating system, the application software

Answers

Answer:

a then c

Explanation:

Without an operating system you just have a pile of metal, and the program contains code, which is just a series of commands

Answer:

d.) The operating system, the application software

Write a recursive function named is_decreasing that takes as its parameter a list of numbers. It should return True if the elements of the list are strictly decreasing (each element in the array is strictly less than the previous one), but return False otherwise.

Answers

Answer:

c

Explanation:

The term __________ denotes data that is being stored on devices like a universal serial bus (USB) thumb drive, laptop, server, DVD, CD, or server. The term __________ denotes data that exists in a mobile state on the network, such as data on the Internet, wireless networks, or a private network. A. data in transit, data on record B. data at rest, data in transit C. data in transit, data at rest D. data on record, data in motion

Answers

Answer:

B. data at rest, data in transit

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Data at rest refers to a form of data that is stored on devices such as; a universal serial bus (USB) thumb drive, laptop, server, DVD, CD, or server.

Data in transit is simply any data that exists in a mobile or dynamic state on the network, such as data on the Internet, wireless networks, or a private network.

An engineer is configuring AMP for endpoints and wants to block certain files from executing. Which outbreak control method is used to accomplish this task

Answers

Question Completion with Options:

A. device flow correlation

B. simple detections

C. application blocking list

D. advanced custom detections

Answer:

The outbreak control method that is used to accomplish the task of configuring AMP for endpoints and to block certain files from executing is:

C. application blocking list

Explanation:

The application blocking list creates a list of application files, which the AMP continuously tracks and analyzes to compare the file activities with previous cyber attacks.  Specifically, the AMP for Endpoints is a cloud-managed endpoint security solution, which provides a retrospective alert to prevent cyber-security threats, and rapidly detects, contains, and remediates malicious files on the endpoints.

continuously tracks and analyzes files and file activities across your systems, and compares these events to what preceded or happened in past attacks. If a file exhibits malicious behavior, the AMP provides you with a retrospective alert which enables you to stop a potential threat from succeeding.

7. System software is the set of software programs that helps run the computer and coordinates instructions between application software and hardware devices. It consists of the operating system (OS) and utility programs. How does the mindset of the designer affect the design of the operating system (e.g., Windows vs. Linux)

Answers

Answer:

Explanation:

The main goal when designing an operating system (OS) is to make sure that the system is as efficient and intuitive as possible. This is the mindset that designers have when creating the operating system. However, this also creates drastically different designs between designers, mainly because one design structure will feel much more natural and intuitive to one designer but not another. Since the designer's own personal taste/mindset drastically affects the design, most companies find their target audience and survey/test various designs. This is done in order to find what features and styles best fit the vast majority of the people.

Consider an Erlang loss system. The average processing time is 3 minutes. The average inter-arrival time is 3 minutes. The number of servers is 3. What is r (sometimes referred to as the offered load)

Answers

Answer:

r = 1

Explanation:

Average processing time ( p ) = 3 minutes

Average inter-arrival time ( a ) = 3 minutes

number of servers ( m ) = 3

Determine the value of r

r ( offered load ) = p/a

                          = 3 / 3  = 1

∴ value of r ( offered load ) = 1

A security analyst recommends implementing SSL for an existing web service. A technician installs the SSL certificate and successfully tests the connection on the server. Soon after, the help desk begins receiving calls from users who are unable to log in. After further investigation, it becomes clear that no users have successfully connected to the web server since the certificate installation. Which of the following is MOST likely the issue?
A. DA Incorrect firewall rules are blocking HTTPS traffic.
B. Users are still accessing the IP address and not the HTTPS address.
C. DC Workstations need an updated trusted sites list.
D Users are not using tokens to log on.

Answers

C- I think. I hope this helps you.

AWS's EC2 is primarily considered which type? OA OB. Maas O Claas O D. None of the above O E. Serverless​

Answers

Answer:

IaaS (Infrastructure as a Service)

"Amazon takes the responsibility of networking, storage, server and virtualization and the user is responsible for managing the Operating System, middleware, runtime, data and application."

Which statement is accurate to describe a spreadsheet versus an Excel workbook?
a) worksheets have one or more workbooks.
b) workbooks have one or more worksheets.
c) workbooks are the same as word documents.
d) worksheets always refer to real paper.

Answers

C is the correct answer

what is the python ?​

Answers

Answer:

Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation. 

This is my Opinion.

Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation.

Hope this helps you :)

Can someone compress this ipv6 address? 558c:0000:0000:d367:7c8e:1216:0000:66be

Answers

558c::d367:7c8e:1216:0:66be

11111 Power 2 sovle ​

Answers

123,454,321. you just multiply 11111 by itself

At the Greene City Interiors branch office, you have been asked to implement an IP network. Your network ID is currently192.168.1.0/24. You need to divide this in half network (two subnets) to accommodate hosts on two separate floors of the building, each of which is served by managed switches. The whole network is served by a single router.
Based on the above scenario, answer the following questions:
1. To divide the network in half, what subnet mask do you need to use?
2. What are the subnet IDs for each network?
3. Your manager is not satisfied with the new subnet scheme and wants to reduce the number of subnets to make more hosts and addresses available in each subnet. Is there a way to use the same subnet for the two floors of the office?

Answers

Answer:

3 is your correct answer

Other Questions
Hai vn ng vin chy trn cng 1 on ng, vn ngvin A chy vi vn tc 12 m/s vn ng vin B chy vi vn tc 36 km/h. Hi vn ng vin no chy nhanh hn? Please help me! I will give brainly!Question,Reasoning Explain how you can tell which product is greater without multiplying or estimating.3.75 x 922 37.5 x 9.22Question,Modeling Real Life Nutritionists recommend that fifth-graders should consume about 5 ounces of protein each day. One serving of yogurt contains 0.6 ounce of protein. You eat 2.5 servings of yogurt in 1 day. Do you consume enough protein for the day by eating yogurt? Yes or No Explain why pls answer quick it's gr 9 academic math lol The answer is D. I can't figure out why? The human range is from 20 Hz to 20 kHz... the division method of 680624 and 165649 How were Southern plantations able to meet the demand for more cotton in the 1800s? The assertion that non-formal institutions have no role to play at the processing stage of the system theory is an empty rhetoric. Look at the image, read, and choose the correct pronoun to complete the sentence.Man sitting on a park bench, he wears glasses and he is reading a tablet________ tiene que usar lentes para leer. Nosotros Nosotras l Ella The way a writer writes is referred to as the Write an equation in point slope form for each line. Slope is 0 and (1 , 2) is on the line Which of the following would make a column more likely to buckle?Increase its ultimate compressive strengthIncrease its lengthIncrease its Youngs modulusIncrease its cross-sectional areaIncrease its area moment of inertiaTrue or false: Increasing a materials ultimate compressive strength makes it less likely to crush under its own weight (assuming all other things equal). True FalseTrue or false: The area moment of inertia of an object only depends on its shape, not its size. True False The function f(t) = 3 - t shows the cost of an ice cream sundae ($) with a different number of toppings (t). What is the slope of the function? Will Mark brainlest help please please pease 4(1)+12(x+3)-6(x-5)=4(12)+4(x) is a prokaryotic transcription terminating factor.A.Rho factorB.Poly U tailC.Poly A tailD.Hairpin loop IMPORTANT NEED ANSWER ASAP !!The stem plot shows the number of mini-marshmallows eaten in one minute by a group of people competing in a contest.Row1 with a 2 to the left of the bar with a 9 to the right. Row 2 with a 3 to the left of the bar with 8, 9 to the right. Row 3 with a4to the left of the bar with 2, 6, 7, 8, 8to the right. Row 4 with a5to the left of the bar with 3, 5, 5, 5 to the right. Row 5 with a 6to the left of the bar with 1, 3, 7to the right.Key: 2|9 = 29 mini-marshmallowsWhich of the following is a correct statement about the distribution? There are no outliers. The distribution is skewed left. The center is around 44. The distribution is bimodal. factorize: x + 6x + 5-4y - y what is (x 3)(x 5) = 35 BCBS fee-for-service, or traditional coverage, is selected based on what criteria? A spherical conductor of radius = 1.5 cm with a charge of 3.9 pC is within a concentric hollow spherical conductor of inner radius = 3 cm, and outer radius = 4 cm, which has a total charge of 0 pC. What is the magnitude of the electric field 2.3 cm from the center of these conductors?