Computer Science, asked by Esha1058, 18 days ago

Write a python function to add ing at end of a given string and return the new string.

Answers

Answered by mariamrilwana
1
  • def add_string(str1):
  • length = len(str1)
  • if length > 2:
  • if str1[-3:] == 'ing':
  • str1 += 'ly'
  • else:
  • str1 += 'ing'
  • return str1.
Similar questions