import random

def q1(s1):
    c=list(s1)
    return(c)
    
s=input()
a1=q1(s)
print(a1)

def q2(s2):
    ans=""
    for i in s2:
        ans=ans+i
    return ans
    
print(q2(a1))

def q3(s3):
    l1=[]
    for i in range(0,s3):
         n=random.randint(1,s3)
         l1.append(n)
    return(l1)

i3=input("enter n:")
print(q3(int(i3)))


def q4(s4):
    s4.sort(reverse=True)
    return s4;
    
i4=int(input("enter the number of elements to be in list:"))
l2=[]
for i in range(0,i4):
    temp=int(input())
    l2.append(temp)

print(q4(l2))


def q5(a):
    ele_count={}
    l=[]
    for ele in a:
        if ele in ele_count:
            ele_count[ele]+=1
        else:
            ele_count[ele]=1
    l.append(ele_count)
    return l
    
n=int(input("enter no of elements:"))
a=[]
for i in range(0,n):
    temp1=int(input())
    a.append(temp1)

print(q5(a))






    

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: