Sei sulla pagina 1di 1

s = input('Enter the word: ')

if s[0:].isupper():
print(s)
elif s.endswith('ing'):
if len(s) <= 5:
print(s)
else:
print(s[:-3])
elif s.endswith('s'):
if len(s) <= 3:
print(s)
else:
print(s[:-1])
elif s.endswith('ed'):
if len(s) <= 4:
print(s)
else:
print(s[:-2])
else:
print(s)

Potrebbero piacerti anche