The task requires me to cut a word in half and reverse it. Without using the if statement.
However if it has an uneven amount of letters, the remaining letters must stick to the first half of the word. Not the second like python does automatically.
I succeeded in cutting the word in half and reverse it. I tried multiple things but until now I have not found a way to cut the letter and put it behind the first half.
If I used the name 'Boris' and run the program as it is, the output will be 'risBo' and I have to make it say 'isBor'
#input
woord = input("Geef een woord in : ") #here I ask the user to give a word
#verwerking
eerste_helft = woord[0:len(woord)//2] #I cut the first half
tweede_helft = woord[(len(woord)//2):] #and cut the second
#output
print(tweede_helft + eerste_helft) #here I reversed the two halves