in this post i'll show you how to create a code to count the number of seconds in a year

this is the link of the notebook where you can find the code :

it is the first code in the notebook

1- the number of years

in the first line you input the number of years you want to calculate the seconds in .

2-we use a function callled "number_of_seconds " it takes one argument which is the nubmer of years (we convert its type first to float as input function produces strings

we do this by mutiplying the number of years by (365 )which is the number of days * 24 the number of hours in a day * 60 the number of mins * 60 the number of seconds

3- we call this function and pass the value of the parameter

4- we print answer

**** ADDITIONAL code

this second code in this note book __:https://github.com/kerminaFekry/datai__

converts the temperature in fehrenheit to celsius

1- we enter the temp in F

2- we create a function called convert_to_C which takes one argument

we do it by subtracting 32 and then mutiply by .5555

3- we call this function and pass the value of the parameter after converting its type

4- we print answer