Lab#4 Ex1_chap8_and_ex3_chap10

# Exercice 1 chapter 8

# function that takes a string as an argument and display the letters backward, one per line

def string_backward(word):
lengh=len(word)
while lengh>0:
letter=word[lengh-1]
print(letter,)
lengh=lengh-1

a=input(‘Enter a word : ‘)
print(“”)
print(‘Thise are the letters of your word backward and one per line!’)
print(“”)
string_backward(a)