<jupyter_start><jupyter_text>The shoes shopper code<jupyter_code>s = "hello"
t = s[:3] + "t" + s[3+1:]
t
def mutate_string(string, position, character):
    
    s = string
    t = s[:position] + character + s[position+1:]
    print(t)
mutate_string("hello",3,"t")
s = input("please enter the string:")
p = input("please enter the sub string:")
lister  = []

for i in s:
    if i in p:
        lister.append(i)
        
print(lister)        
        





p = Counter(map(str,input().split()))
print(p)
S = Counter(map(str,input().split()))

for i in range(len(P)):
    if p[i] == s:
        p[i] += 1
 
x = "ABCDCDC"
z = "CDC"
listerss = []

for i in range(len(x)):
    if x[i:len(z)+i] == z[0:] :
        listerss.append(z[0:])
        
        
        
    
    
print(listerss)    
    
    
    
    

p = "ABCDCDC"
print(len(p))

s = "CDC"
print(len(s))

for i in range(len(p)):
    if p[i:len(s)+i] == s[0:]:
        print("True")
    else:
        print("false")
        
        

    
s = "CDC"
s[0:]
p = "ABCDCDC"
p[0:4]<jupyter_output><empty_output><jupyter_text>the true code of neeraj ashish thalarv<jupyter_code>from collections import Counter
x = "ABCDCDC"
z = "CDC"
listerss = []


for i in range(len(x)):
    if x[i:len(z)+i] == z[0:] :
        listerss.append(z[0:])
        
        
print(len(listerss))        
        
        
        
        
        
    
    
 
k = ['CDC', 'CDC']
len(k)<jupyter_output><empty_output><jupyter_text>hacker rank problem<jupyter_code>import random
prot = []
final = []
for i in range(3):
    k = random.randint(0,2)
    prot.append(k)
    final.append(prot)


print(prot)  
print(final)  




usa = []
for  i in range(10):
    
f = [1,2,3,4]
l = [6,6,7,8]
f.append(l)
print(f)<jupyter_output>[1, 2, 3, 4, [6, 6, 7, 8]]<jupyter_text>my own code for hacker rank problem<jupyter_code>x = int(input())
y = int(input())
z = int(input())
n = int(input())

cor  = []
lev = []
for i in range(x+1):
    for j in range(y+1):
        for k in range(z+1):
            if i <= x or j <= y or k <= x :
                cor.append([i,j,k])

for b in cor:
    if sum(b) > n or sum(b) < n:
        lev.append(b)


print(cor)   
print(lev)     





               


        
                    
                        
                                
print(cor)
h = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
lsi = []
for i in h :
    if sum(i) > 120 or sum(i) < 10:
        lsi.append(i)

print(lsi)       


N = int(input())
lister = []
#for i in range(n):
p = int(input("enter the positon that you want to select in the list:"))
s = int(input("enter the number that you want to replace: "))
lister[p] = s

ret = [0,0,0]
p = int(input("enter the positon that you want to select in the list:"))
s = int(input("enter the number that you want to replace: "))
ret.append(10)
print(ret)<jupyter_output>[0, 0, 0, 10]<jupyter_text>HACKER RANK RUNNER UP PROBLEM<jupyter_code>n = int(input())
arr  = list(map(int,input().split()))
print(arr)
ter = [2,3,6,6,5]
ter1 = []
p = max(ter)

for i in range(len(ter)):
    if ter[i] < p:
        ter1.append(ter[i])

s = max(ter1)
print(s)        


    

    

# programme to find the largest number in the list without using the max function
p = [1,2,3,4,5]
for i in range(len(p)):
    if p[i:i+1] < p[i:i+2]:


        
    

arr = []
for i in range(10):
    arr.append(i)

print(arr)    

new = []
new1 = []
new2 = []
for i in range(5):
    name = input()
    score = float(input())
    new.append([name,score])

print(new)

k = min(new)


for  h in range(len(new)):
    if new[h] > k:
        new1.append(new[h])


print(new1)

for j in range(len(new1)):
    a = j + 1
    for v in range(a,len(new1)):
        if new1[j][1] == new1[v][1]:
            new2.append(new1[j])
            new2.append(new1[v])



print(new2)  

sor = []
for m in new2:
    sor.append(m[0])


sor.sort()
for word in sor:
    print(word)    

    
    






    
        
    
    
    








mn = []
for m in l:
    mn.append(m[0])

mn.sort()
for word in mn:
    print(word)

t = [['arr', 10.0], ['arr1', 10.0], ['c', 12.0], ['d', 13.0], ['e', 14.0]]
s = []
m = t[0]

for i in range(len(t)):
    a = i+1

    for j in range(a,len(t)):
        if t[i][1] == t[j][1]:
            s.append(t[i])
            s.append(t[j])
        
            
print(s)


   
for i in range(1,6):
    print(i)
if t[i] == t[j] :
            s.append(t[i])
            s.append(t[j])
d = [["h",10],["p",20]]
d[0][1]
            

j = ["h",10]
j[1]
l = [['harry', 37.21], ['berry', 37.21]]
mn = []
for m in l:
    mn.append(m[0])

mn.sort()
for word in mn:
    print(word)



    
    

dic = {}
for i in range(2):
    name = input().split()
    marks = list(map(int,input()))
    dic[name] = marks


print(dic)    

  
    
    
dic = {"neeraj":10,"hello":20}
values = []
for i in dic.values():
    values.append(i)

print(values)    

sum = 0
for j  in range(len(values)):
    sum = sum + values[j]
    average = sum/len(values)

print(average)<jupyter_output>[10, 20]
15.0<jupyter_text>IMPORTANT FOR THE ASSIGN THE DICTIONARIES<jupyter_code>n = int(input())
student_marks = {}
for _ in range(n):
    name, *line = input().split()
    scores = list(map(float, line))
    student_marks[name] = scores


    
        
        
        
student_marks
r = input("enter the letter:")
dic = {}

for char in r:
    if char in dic:
        dic[char] = dic[char] + 1
    else:
        dic[char] = 1
print(dic) 
n = int(input())
student_marks = {}
value = []
for _ in range(n):
    name, *line = input().split()
    scores = list(map(float, line))
    student_marks[name] = scores
query_name = input()

for i in student_marks.keys():
    if i == query_name:
        for j in student_marks.value():
            value.append(j)

sum = 0

for k in range(len(value)):
    sum = sum + value[k]
    average = sum/len(value)

print(average)    
        
        

        
            
                
        
        
        
    
    
    
    
    
                
    
    
    
        
    
dic = {}
sco = []
n = int(input())
for i in range(n):
    name,*line = input().split()
    scores = list(map(float,line))
    dic[name] = scores

query_name = input() 

for j in dic.keys():
    if j == query_name:
        sco.extend(dic[j])


k = sum(sco)
average = k/len(sco)
print(format(average,".2f"))
        
        





    
    
d = {'neeraj': [1.0, 2.0, 3.0, 4.0], 'sas': [5.0, 6.0, 7.0, 8.0]}
p= []
d.keys()
d.values()

for i in d.keys():
    print(i)

for j in d.values():
    print(j)


p.extend(d["neeraj"])

f = sum(p)/len(p)
print(format(f,".2f"))<jupyter_output>2.50<jupyter_text>next code in hacker rank<jupyter_code>from itertools import product

print (list(product([1,2,3],repeat=2)))




from itertools import product

k = list(map(int,input().split()))
p = list(map(int,input().split()))
print(p)
print(k)

c =  list(product(k,p))
print(*c)
d = [1,2,3]
print(*d)
f = [1,2,3]
print(*f)
# the new version of the code is here
from itertools import product

k = list(map(int,input().split()))
p = list(map(int,input().split()))
print(p)
print(k)

print  (*list(product(k,p)))

movies = {}
name,*line  = input("please enter the name of the movie and the title:").split()
title = list(map(str,line))
movies[name] = title



k  = input("please enter the movie name that you want to search:")
f = input("please enter the title name that you want to search:")

for i in movies.keys():
    for j in movies.values():
        if i == k and j == g:
            print("yes you have found the coorect value in that")
        

        





print(movies)
list = []
N = int(input("Enter the number of lines: "))
for  i in range(N):
    p, line = input().split()
    list.insert(int(p),line)
    print(list)
    
    
first, *rest = input().split()
score = list(map(float,rest))
print(first)
print(score)
print(*rest)

k = []
k.insert(1,1)
print(k)


k.insert(int(input()),int(input()))

p, line = input().split()
k.insert(int(p),line)

k<jupyter_output><empty_output><jupyter_text>THE ORGINAL CODE FOR THE HACKER RANK LIST PROBLEM<jupyter_code>N = int(input("Enter the number of lines of code: "))
empty = []
conv = []
for i in range(N):
    x  = input().split()
    empty.append(x)
for j in range(len(empty)):
    if empty[j][0] == "insert":
        x = int(empty[j][1])
        y = int(empty[j][2])
        conv.insert(n,m)

    elif empty[j][0] == "print" :
        print(conv)    

    elif empty[i][0] == 'remove':
        conv.remove(int(empty[i][1]))
            
    elif empty[i][0] == 'append':
        conv.append(int(empty[i][1]))
            
    elif empty[i][0] == 'sort':
         conv.sort()
           
    elif empty[i][0] == 'pop':
        conv.pop()
            
    elif empty[i][0] == 'reverse':
        conv.reverse()
                



    





v = input().split()
print(v)
x = []
y = []
for  i in range(2):
    f  = input().split()
    x.append(f)
for j in range(len(x)):
    if x[j][0] == "insert":
        m = int(x[j][1])
        n = int(x[j][2])
        y.insert(m,n)

    elif x[j][0] == "print":
        print(y)

    elif x[j][0] == "remove":
        conv.remove()
            

        



x
y
v = [1,2,3,4,5]
v.remove(1)
v
n = int(input("enter the number of values:"))
integer_list = tuple(map(int,input().split()))
print(hash(integer_list))
for i in range(10):
    print(i)
l = []
for i in range(3):
    for j in range(3):
        l.append([i,j])
l
def swap(s):
    for i in range(s):
        if s[i] == s[i].upper():
            return s[i].lower()

        


    
    
    
    
s = "neeraj"
for  i in s:
    if i == i.upper():
        print("true")
    else:
        print("False")

    

s = "hello"
s.capitalize()
k = "hello"
k[0].upper()
k["h"]
s = "hello"
t = "fe"
k = s + t
k
f = "hello"
for i in s:
    print(i.capitalize())<jupyter_output>H
E
L
L
O<jupyter_text>swap case programme<jupyter_code>def swap(s):
    output = []
    for i in range(len(s)):
        if s[i] == s[i].upper():
            output.append(s[i].lower())
        elif s[i] == s[i].lower():
            output.append(s[i].upper())
    print("".join(output))        
            
           
swap("Hello")
def swap(s):
    output = []
    for i in range(len(s)):
        if s[i] == s[i].upper():
            output.append(s[i].lower())
        elif s[i] == s[i].lower():
            output.append(s[i].upper())
    print("".join(output))
swap('HackerRank.com presents "Pythonist 2"')<jupyter_output>hACKERrANK.COM PRESENTS "pYTHONIST 2"<jupyter_text>split and join the string<jupyter_code>def split_join(s):
    
h = "hello how are you"
h.split("#")
"-".join(h)
l = "hello there"
k = l.split(" ")
k

#for i in l.split(" "):
    #print("-".join(i))

for i in k:
    print("-".join(i))
    
s = "hello how are you"
l = "-".join(s)
l
m = []
for i in l:
    m.append(i.split(" "))
 
    

b = []
for i in m:
    b.append("".join(i))
 " ".join(b)
class poundtokilogram():

    def __init__(self,pounds) -> None:

        self.pounds = pounds

    def kilogram(self):

        output = 0.45359237 * self.pounds 

        return output


a = int(input("Enter the number of pounds that need to br converted to kilogram: "))        
pound = poundtokilogram(a)
pound.kilogram()






           
        
    
        



for i in range(10):
    print(i)
# palindrome problems
s = "hello"
char = ""
for i in s:
    char = i + char
    
char    
    
    
   
    
    
def checkpalindrome(s):
    char  = ""
    
    for i in s:
        char = i + char
        
        
    if char == s:
        print("it is a palindrome")
    else:
        print("it is not a palindrome")
        
        
k  = input("Enter the palindrome to check:")    
checkpalindrome(k)<jupyter_output>Enter the palindrome to check:malayalam
it is a palindrome
{'fraction_non_alphanumeric': 0.17619573528162433, 'fraction_numerical': 0.01996431908928723, 'mean_word_length': 2.1628156904889844, 'pattern_counts': {'":': 6, '<': 41, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '195616', 'license': 'Apache-2.0', 'n_tokens_mistral': 4847, 'n_tokens_neox': 4614, 'n_words': 1123, 'path': 'only python codes/hacker rank.ipynb', 'repo_name': 'NEERAJASHISH/my-personal-codes', 'size': '11771'}