-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solution to hackerRank Leap Year Python #155
Merged
Merged
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
256922c
hackerRank: Leapyear
Petsamuel 9352fb4
Merge branch 'iamdestinychild:main' into dev
Petsamuel dbfa045
hackerRank: Leapyear
Petsamuel 08da112
update workflow
Petsamuel 295a3d9
Merge branch 'iamdestinychild:main' into dev
Petsamuel 655d62b
Update assign-author.yml
Petsamuel f719942
Merge branch 'iamdestinychild:main' into dev
Petsamuel 880f396
checks
Petsamuel 579135f
update
Petsamuel feba3eb
Merge commit '579135f' into dev
Petsamuel d7ff00d
Merge branch 'iamdestinychild:main' into dev
Petsamuel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +0,0 @@ | ||
name: 'Author Assign' | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
assign-author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: toshimaru/[email protected] | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## task | ||
|
||
Given a year, determine whether it is a leap year. If it is a leap year, return the Boolean True, otherwise return False. | ||
|
||
Note that the code stub provided reads from STDIN and passes arguments to the is_leap function. It is only necessary to complete the is_leap function. | ||
|
||
## Input Format | ||
|
||
Read year, the year to test. | ||
|
||
|
||
## Output Format | ||
|
||
The function must return a Boolean value (True/False). Output is handled by the provided code stub. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def is_leap(year): | ||
leap = False | ||
|
||
# Write your logic here | ||
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0): | ||
return True | ||
else: | ||
return False | ||
|
||
return leap | ||
|
||
year = int(input()) | ||
print(is_leap(year)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your screenshot should be after the problem has been solved