Computer Science, asked by XxYatashixX, 1 month ago

OUTPUT Of Following Python C.ode

string = input("enter a string:")
lenth=len(string)
a=0
string2=''
while a<lenth:
if a==0:
string2+=string[0].upper()
a+=1
elif(string[a]==''and string[a+1]!=''):
string2+=string[a]
string2+=string[a+1].upper()
a+=2
else:
string2+=string[a]
a+=1
print("original string:",string)
print("captilized word string:",string2)

SPAMS WILL BE REPORTED​

Answers

Answered by Anonymous
20

Answer:

After Running The Above Python C.ode The Output is In above attachment. .

Version of python Used - Python Anaconda

Attachments:
Answered by peehuthakur
0

Answer:

ans.

string = input(“Enter a string :”)

length = len(string)

mid = length/2

rev = -1

for a in range(mid) :

if string[a] == string[rev] :

a += 1

rev -= 1

else :

print(string, “is not a palindrome”)

else :

print(string, “is a palindrome”)

Similar questions