Sarthaks Test
0 votes
24 views
in CBSE by (15 points)
def fun(s):
 k=len(s)
 m=""
 for i in range(0,k):
 if(s[i].isupper()):
 m=m+s[i].lower()
 elif s[i].islower():
 m=m+s[i-1].upper()
 elif s[i].isdigit():
 r=int(s[i])+1
m=m+str(r)
 else:
 m=m+'@'
 print(m)
fun('Desert#2025')

Please log in or register to answer this question.

Related questions

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...