-
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 all 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Update GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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
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
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,35 @@ | ||
--- | ||
name: Stale Issue And PR | ||
|
||
on: | ||
schedule: | ||
- cron: "0 12 * * *" | ||
workflow_dispatch: | ||
concurrency: | ||
group: environment-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
stale: | ||
name: 🧹 Clean up stale issues and PRs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🚀 Stale Issue And PR | ||
uses: actions/stale@v8 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
days-before-stale: 30 | ||
days-before-close: 7 | ||
remove-stale-when-updated: true | ||
stale-issue-label: "stale" | ||
exempt-issue-labels: "no-stale,help-wanted" | ||
stale-issue-message: > | ||
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be | ||
marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us | ||
know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and | ||
locked in 7 days if no further activity occurs. Thank you for your contributions! | ||
stale-pr-label: "stale" | ||
exempt-pr-labels: "no-stale" | ||
stale-pr-message: > | ||
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has | ||
been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you | ||
for your contributions! |
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