simple age calc using python

oxy_oxide

Hamza Hesham

Posted on May 15, 2020

simple age calc using python

hello, today we will make a simple age calc using python
first we will print a statement that includes "welcome to age calc"
Alt Text
second, we will make a variable called x and assign it to an input function "please enter your birth year :\n" an convert the type of input to integer
!NOTE!:\n for making a new line
Alt Text
After that we will define a function and call it calc by using :def calc(x=x,y=2020)
after that we will return y-x
and call the function in print statement
Alt Text
thanks for reading , peace.

đź’– đź’Ş đź™… đźš©
oxy_oxide
Hamza Hesham

Posted on May 15, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related