In: Computer Science
#*******************main.py*************************#
str1 = '2+1' #assign variable
num1 = eval(str1)#evaluate funtion
month = input("Enter birth month: ")#prompt for month
print("Birth month is: ",month)#print month
print("Number of letter in Birth month: ",len(month))#length of
moth
print("Letter r in the month: ",month.count('r'))#occurrence of
r
conctString = "";
while(num1!=0):
conctString = conctString+month;
num1= num1-1;
print("Concatinating String ",conctString)#print conctString
print("Last two letter in Upper case:
",month[(len(month)-2):(len(month))].upper())#last two upper
Please let me know if you have any doubt or modify the answer, Thanks :)