Skip to content
Snippets Groups Projects
Commit fb3ada00 authored by Rajesh Gupta N's avatar Rajesh Gupta N
Browse files

Upload New File

parent 3a8d3bb4
Branches master
No related tags found
No related merge requests found
CB.EN.U4CSE16238
RAJESH GUPTA N
OPEN LAB
PERIODICAL 2
QUESTION 1:
count=0
for i in range(len(items)):
for j in range(len(origitems)):
if(items[i]==origitems[j]):
if(price[i]!=origprice[j]):
count+=1
return count
QUESTION 2;
i=1
m=len(prefixString)
n=len(suffixString)
l=len(text)
plen=0
slen=0
flag1=0
flag2=0
if(text[flag1:i]==prefixString[m-i-1:m-flag1-1]):
plen+=1
i+=1
else:
flag1+=1
i=1
if(text[l-i-1:l-flag-1]==prefixString[n-flag2-1:n-i-1]):
plen+=1
i+=1
else:
flag1+=1
return text[flag1:flag2]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment