Open AI GPT-3 Solved The hacker-Rank Questions!
Shoaib Ahmed
Software Engineer | Co-founder @E-medigo | Python | DevOps | Full-Stack Developer | ML
The Open AI Solved the hacker-rank question by writing the algorithm as follows.
To determine whether a given year is a leap year, you can use the following steps:
Here is the code that implements these steps in the is_leap function:
def is_leap(year)
??? if year % 4 == 0:
??????? if year % 100 == 0:
??????????? if year % 400 == 0:
??????????????? return True
??????????? else:
??????????????? return False
??????? else:
??????????? return True
??? else:
??????? return False
Simple and Sweet!!!
Highly Appreciated :(