Learn Python easy way - Example 2 Numerology

Let us take a simple program in Python to appreciate the language. We will take the date of birth as user input, then we will add all the digits in the date to a single digit and then we will show the Numerology Life path according to the number.

Enter the date of birth inside the black panel, without using any separators like dash or slashes.

If you want to download the program on your computer, click on the arrow at the left bottom of the first panel in the compiler below.


We have defined a function named Add_numbers(dob) in the beginning of the program. dob is the parameter that the function takes. We will collect the dob as an integer from the user at line 20
dob = int(input())

We will collect the output of the function in a new variable named final_answer and use a if -elif-else construct to print different messages for the value of the final_answer between 1 and 9

Next : Find the smallest and the largest of given numbers