Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
iax0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6b664aab
authored
Oct 01, 2017
by
likorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug with b-days this year
parent
785a74f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
lab3/lab3.py
lab3/lab3.py
View file @
6b664aab
...
...
@@ -15,6 +15,9 @@ print("You're "+str(age)+" years old")
if
(
b_day
.
month
==
today
.
month
)
and
(
b_day
.
day
==
today
.
day
):
print
(
"Happy b-day!"
)
elif
b_day
.
month
>=
today
.
month
:
next_b_day
=
datetime
.
date
(
today
.
year
,
b_day
.
month
,
b_day
.
day
)
else
:
days_left
=
next_b_day
-
today
print
(
"There're "
+
str
(
days_left
)
+
" left"
)
\ No newline at end of file
next_b_day
=
datetime
.
date
(
today
.
year
+
1
,
b_day
.
month
,
b_day
.
day
)
days_left
=
next_b_day
-
today
print
(
"There're "
+
str
(
days_left
)
+
" left"
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment