FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
devskill-python-course/Basic Python/Problem2.py at master · maf345/devskill-python-course · GitHub
maf345
/
devskill-python-course
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
devskill-python-course
/
Basic Python
/
Problem2.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (21 loc) · 945 Bytes
Breadcrumbs
devskill-python-course
/
Basic Python
/
Problem2.py
Copy path
File metadata and controls
29 lines (21 loc) · 945 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Problem Statement: Write a program to input month number and print number of days in that month.
# Example:
# Input:
# Enter month number: 1
# Output:
# It contains 31 days.
# Month Equivalent Number: January = '1', February = '2', March = '3', April = '4', May = '5', June = '6', July = '7',
# August = '8', September = '9', October = '10', November = '11', December = '12'
# January, March, May, July, August, October, December have 31 days
# February has 28/29 days
# April, June, September, November have 30 days
month
=
int
(
input
(
"Enter month number: "
))
if
month
>=
1
and
month
<=
12
:
if
month
==
1
or
month
==
3
or
month
==
5
or
month
==
7
or
month
==
8
or
month
==
10
or
month
==
12
:
print
(
"It contains 31 days"
)
elif
month
==
2
:
print
(
"It contains 28/29 days"
)
else
:
print
(
"It contains 30 days"
)
else
:
print
(
"Invalid Month Number. Please enter number between 1 to 12 to continue!"
)
Back
|
FazBrowse Home
|
New Git URL