<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Connaissance 
Step1:  1.1) Declarative Knowledge on Palindromas
## "A palindroma is a word that can be spelled from both sides"
a palindroma is a character's string containing a chain of lenght n
"abc...cba" is a palindroma
"aba" is a palindroma
any word with two identical letters is a palindroma
1.2) Imperative Knowledge to check that a word is a Palindroma
Step2:  2.1) Declarative Knowledge on square roots
## "The square root $\displaystyle x=\sqrt{y}$, of a number $y$ is a number $x$ such as
Step3:  3) Conditional Instructions
-if 
-else
-elif
3.1) What is a bissextile year
Step4:  4) Usual operators
Putting statements x and y in relations trough the operators is the basics of formal logic
4.1) Comparison operators
| Sign | Meaning             |
|-----|----------------------|
| x == y | x Is equal to y             |
| x != y | x Is Not equal y        |
| x > y  | x Is greater than y          |
| x < y  | x Is smaller than y         |
| x >= y | x Is greater or equal than y  |
| x <= y | x Is smaller or equal than y  |
| -x | opposite to x (when x a number)|
| +x | positive to x (when x a number)|
| ~x | symmetric to x (when x a number)|
4.2) Logical operators
|relation between expressions| meaning|
|----------|--------|
| (x) and (y)  | x and y are expressions SIMULTANEOUSLY both True |
| not (x) | the negation of x is True |
| (x) or (y) | at least x or y is True INDEPENDENTELY |
Step5:  4.3) Arithmetic operators
| Number operations |Arithmetics|
|-----|----------------------|
| y*x | multiplication of y times  x |
| y/x | division of y by x (both numbers)|
| y//x | floor division of y by x |
| y%x | Modulus, returns the decimal part (remainder) of the quotient of y divided by x.|
Step6:  4.4) Operations on lists and characters
| Character operation | Signification |
|---------------------|---------------|
| 'y'*x | repeat 'y' x times (when y a character)|
| x in y  | x belong to y (when y is a list)  |
<ASSISTANT_TASK:>
Python Code:
As_soon_as_I_become_a_good_programmer_I_will_be_rich=False
# Let us test it : 
if As_soon_as_I_become_a_good_programmer_I_will_be_rich: print("Then let us start programming !")
else: print('Do Algorithmics !')    
Explanation: Connaissance : Types of Knowledge
## 1) Declarative Knowledge : the statements of fact.
 ## 2) Imperative Knowledge : recipies that can be applied to solve a problem.
Declarative Knowledge (definition)
Any statement or affirmation, that we estimate "as beeing desirable to be true"
it can be True
it can be False
...The Answer to the Ultimate Question of Life, The Universe, and Everything:
42
End of explanation
## Check if the french word "ressasser" is a palindroma
# We first declare some variables
word_to_test='ressasser'
# We need to define the indexes in the chain of characters
index_head=0
index_tail=len(word_to_test)-1
# Now we are going to print
print(word_to_test)
print("The lenght of the word is: {}".format(len(word_to_test)))
print("The first letter is: {}".format(word_to_test[index_head]))
print("The last letter: {}".format(word_to_test[index_tail]))
if (word_to_test[index_head]==word_to_test[index_tail]):
    
    if index_head < index_tail: 
        print("Untill now it seems a palindroma")
        index_head=index_head+1
        index_tail=index_tail-1
        print(index_head)
        print(index_tail)
    else: print("The word '{}' is a palindroma".format(word_to_test))
else: print("The word '{}' is NOT a palindroma".format(word_to_test))
Explanation: 1.1) Declarative Knowledge on Palindromas
## "A palindroma is a word that can be spelled from both sides"
a palindroma is a character's string containing a chain of lenght n
"abc...cba" is a palindroma
"aba" is a palindroma
any word with two identical letters is a palindroma
1.2) Imperative Knowledge to check that a word is a Palindroma:
The word must be declared as a variable that alows to chain letters (string)
The lenght of the string must be known using a build in function len
The string must be readed letter by letter from both sides untill we meet 
Check that both letters are identical, if yes then go to (3)
If both ends have been reached conclude that that word is a "True" Palindroma 
* Pasta al dente* Cooking Recipies:
Start puting hot water on the pot add salt
When $T$ of the water is greater than 100$°$ Celcius put 150mg of Pasta
Otherwise check that the water is heating up properly and wait
When the Pasta is in the cooker wait until it is  al dente
End of explanation
# Give a number and find the first guess
print('Enter the number y, from whom you are asked to find the square root')
y=eval(input('y = '))
print('Give a first guess for x, called g')
g=eval(input('g = '))
print("End of step 1")
print("(The square product of {0} is {1})".format(g,g*g))
print("The square of the average of the guess and y divided by guess is:")
print((0.5*(g+y/g))**2)
print("How accurate is this result ?")
print("Well, the square of your guess is {}".format(g*g))
if g*g == y:
    print("Whoah, it is a good guess")
    print("The solution is:")
    print((0.5*(g+y/g)))
else:
    g=0.5*(g+y/g)
    print("Sorry")
    print("Try again, with, g={} as new guess".format(g))
    print("The average of the new g and y divided by this new g is:")
    print(0.5*(g+y/g))
Explanation: 2.1) Declarative Knowledge on square roots
## "The square root $\displaystyle x=\sqrt{y}$, of a number $y$ is a number $x$ such as:
 # $\displaystyle x \times x = y $ "
2.2) Imperative Knowledge associated to solve square roots
## Here is a Reciple for deductig the square root of a number $ y $, attributed to Heron of Alexandria in the first century AD
Start with a guess for unknown $x$ called $g$
If $g \times g$ is close enought to $y$ : stop and return $g$
Otherwise make a new guess by averaging $g$ and ${y}/{g}$
Using the new guess, repeat the process to point (2)
End of explanation
#Check a number
nb = eval(input('Enter a number = '))
if nb < 0:
    print('{} is a negative number'.format(nb))
elif nb > 0:
    print('{} is a positive number'.format(nb))
else:
    print('{} is a null'.format(nb))
# Leap years are back all 4 years, except secular years if these are not multiple of 400
n = eval(input('Enter a year = '))
if n % 4 != 0:
    print('Year {} is NOT a bissextile year'.format(n))
elif n % 100 != 0:
    print('Year {} is a bissextile year'.format(n))
elif n % 400 != 0:
    print('Year {} is NOT a bissextile year'.format(n))
else:
    print('Year {} is a bissextile year'.format(n))
if ((n % 4 == 0) and (n % 100 != 0)) or (n % 400 == 0): print('Year {} is a bissextile year'.format(n))
else: print('Year {} is NOT a bissextile year'.format(n))
Explanation: 3) Conditional Instructions
-if 
-else
-elif
3.1) What is a bissextile year
End of explanation
a=6
print(~a)
# There is an operator for defining an 'implication'
# p implies q means that 
# p is a sufficient condition for q to be true
# p --> q is equivalent as (not(p) or q)
Je_fais_de_longues_etudes=True
Je_deviens_bon=False
# Je_fais_de_longues_etudes --> Je_deviens_bon
# This can be writen as the following proposition :
(not(Je_fais_de_longues_etudes) or (Je_deviens_bon))
Explanation: 4) Usual operators
Putting statements x and y in relations trough the operators is the basics of formal logic
4.1) Comparison operators
| Sign | Meaning             |
|-----|----------------------|
| x == y | x Is equal to y             |
| x != y | x Is Not equal y        |
| x > y  | x Is greater than y          |
| x < y  | x Is smaller than y         |
| x >= y | x Is greater or equal than y  |
| x <= y | x Is smaller or equal than y  |
| -x | opposite to x (when x a number)|
| +x | positive to x (when x a number)|
| ~x | symmetric to x (when x a number)|
4.2) Logical operators
|relation between expressions| meaning|
|----------|--------|
| (x) and (y)  | x and y are expressions SIMULTANEOUSLY both True |
| not (x) | the negation of x is True |
| (x) or (y) | at least x or y is True INDEPENDENTELY |
End of explanation
a=10
b=3
c=a // b
d=a % b
print(a)
print(type(a))
print(b)
print(type(b))
print(c)
print(type(c))
print(d)
print(type(d))
Explanation: 4.3) Arithmetic operators
| Number operations |Arithmetics|
|-----|----------------------|
| y*x | multiplication of y times  x |
| y/x | division of y by x (both numbers)|
| y//x | floor division of y by x |
| y%x | Modulus, returns the decimal part (remainder) of the quotient of y divided by x.|
End of explanation
'y'*3
a='Je ne dois pas consulter Facebook en cours' + '//'
a*5
a = 5
b = 20
(a < b)
Explanation: 4.4) Operations on lists and characters
| Character operation | Signification |
|---------------------|---------------|
| 'y'*x | repeat 'y' x times (when y a character)|
| x in y  | x belong to y (when y is a list)  |
End of explanation
<END_TASK>