What will be the output of the given codes?
a. >>>str = “This is my first python program. My first Python program is simple.
>>>print (str.replace(‘first’, ‘second’)
>>>print (str.replace(‘first’, ‘second’, 2)
b. >>>s = “I am learning Python and it is simple to learn.
>>>print (‘Maximum character is:’ max(s))
>>>print (‘Minimum character is:’ min (s))
c. >>>str = “This is my first python program. My first Python program is simple.
>>>print (str.count(‘o’,0,28))
>>>print(str.count(‘o’,0,60))
d. >>>str = “Welcome to programming in python”
>>>print (str.find(‘gramm’,0,31))
>>>print (str.find(‘thing’))
e. >>>str = “Welcome to programming in python”
>>>print (str.index(‘gramm’,0,31))
>>>print (str.index(‘thing’))
f. >>>str = “Welcome to programming in python”
>>>print (str.startswith(‘in’,8,25))
>>>str = “Welcome to programming in python”
>>>print (str.startswith(‘in’,23,31))
g. >>>str = “Welcome to programming in python”
>>>print (str.endswith(‘in’,8,25))
>>>str = “Welcome to programming in python”
>>>print (str.endswith(‘in’,0,31))