Skip to content

Commit 035b932

Browse files
authored
Merge pull request larymak#131 from Pascal488/Age-calculator
Age-calculator
2 parents 409d240 + 3f0109c commit 035b932

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Age calculator/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<h1>Age calculator </h1>
2+
3+
**You will required to enter following credential**
4+
- Enter your name
5+
6+
- Your birth year
7+
8+
- Then a program will return your name and current age in number
9+
10+

Age calculator/age.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name = input("What is your name: ")
2+
3+
Birth_Year = int(input("Enter your birth year: "))
4+
5+
Current_time = 2022
6+
7+
def age_caluu():
8+
Age_calculated = (Current_time - Birth_Year)
9+
print ('Hey {} your age is {}'.format(name, Age_calculated))
10+
age_caluu()

0 commit comments

Comments
 (0)