0% found this document useful (0 votes)
5 views

code2pdf_678934d2e53a0

Phyton code 11 class

Uploaded by

podcastwithamit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

code2pdf_678934d2e53a0

Phyton code 11 class

Uploaded by

podcastwithamit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

##n=int(input("Enter value"))

##i=1
##s=0
##while i<n:
## if n%i==0:
## s=s+i
## i=i+1
##if n==s:
## print(n,"Perfect number",s)
##else:
## print(n,"Not a perfect number",s)
##n=int(input("Enter a number:"))
##if n%10==7 or n%7==0:
## print(n,"Is a buzz no")
##else:
## print(n,"is not a buzz no")
##n=int(input("enter a number"))
##f=0
##for i in range(n):
## if i*(i+1)==n:
## f=1
## break
##if f==1:
## print(n,"Is a Pronic Number")
##else:
## print(n,"is not a Pronic Number")l
##n=int(input("Enter a number"))
##c=0
##for i in range(2,n):
## if n%i==0:
## c+=1
##if c>=1:
## print(n,"is a Composite no")
##else:
## print(n,"is not a Composite no. IT is a Prime Number")
##for i in range(97,122):
## for j in range(97,i+1):
## print(chr(j),end="")
## print()
##ori=int(input("Enter the value"))
##temp=ori
##rev=0
##while temp>0:
## digit=temp%10
## temp=temp//10
## rev=rev+(digit**3)
##if ori==rev:
## print(ori,"This is Armstrong",rev)
##else:
## print(ori,"This is not Armstrong",rev)

##j=[]
##k=[]
##a=[]
##choice='y'
##while choice=='y' or choice=='Y':
## L=eval(input("Enter the value"))
## M=eval(input("Enter the value"))
##
## l1=len(L)
## l2=len(M)
##
## if l1==l2:
## for i in range(0,l1):
## j.append(L[i]+M[i])
## k.append(L[i]-M[i])
## b.append(L[i]*M[i])
## print("ADD=",j)
## print("Subtract=",k)
## print("Prod=",b)
## else:
## print("Sorry!!!",l1,"Is not equal to",l2)
## choice=input("Do you want to continue")
##l=[]
##ch='y'
##while ch=='y' or ch=='Y':
## n=input("Enter your Name:")
## r=int(input("Enter your Roll No.:"))
## d=input("Enter your division:")
## s=int(input("Enter Your Standard:"))
## X=[n,r,d,s]
## l.append(X)
## ch=input("DO youwant to Continue? Y/N")
##print(l)
##l=[]
##s=[]
##n=int(input("Enter the no. of Records you wants to Enter:"))
##for i in range(n):
## name=input("Enter Your Name: ")
## sal=int(input("Enter your Salary: "))
## X=[name]
## V=[sal]
## l.append(X)
## s.append(V)
##print(l)
##print(s)
##print(max(s))
##print(min(s))

##t1=()
##t2=tuple()
##print(t1)
##print(t2)

##t3=(16,)
##print(t3)
##t4=(1,2,3,4,67,7,7,44,758)
##print(t4)

##t5=(1,2,3,4,5,6,(8,5,67,8,10),67,98,(8,7,0))
##print(t5)

##t6=tuple('PYTHON')
##print(t6)

##t7=tuple(input("Enter Elements For Tuple"))


##print(t7)

##tuple=eval(input("Enter Elements For Eval "))


##print(tuple)

##def f():
## t=(10,20,30,40,50,60,90,100)
## i=int(input("Enter Index"))
## return t[i]
##print(f())

##t=('p','y','t','h','o','n','i','s','p','r','o','g','r','m','m','i','n','g','l','a','n','g','u','a','g','e')
##l=len(t)
##for i in range(l):
## print('At Indexes',i,'and',i-l,'element:',t[i])

##t=(10,20,30,40,50,60,70,80,90,100,'*')
##T=('A','B','C','D','E','@','#')
##print(t+T)

##print(t==T)

##T1=(1,2,'A','B')
##w,x,y,z=T1
##print(w)
##print(z)
##print(x)

##T1=(1,2,'A','B')
##print(T1*4)

##T1=(1,2,'A','B')
####print(T1)
##del T1
##print(T1)

##t=('p','y','t','h','o','n')
##for i in range(len(t)):
## print(t[i])

##T1=(1,2,'A','B','n','N')
##print(1 in T1)
##print('n' not in T1)

##t=(10,9,99,289,55,289,56,82,58,67,289)
##T=('A','H','R','Y','W','T','Z')
##print(len(t))
##print(len(T))
##print(max(t))
##print(min(t))
##print(max(T))
##print(t.index(99))
##print(t.count(279))
##print(sum(t))
##print(sorted(t))

##t=(10,9,99,289,55,289,56,82,58,67,289)
######t=[start:stop]
##print(t[2:7])
##print(t[5:9])
##print(t[2:-7])
##print(t[-9:-3])
##print(t[:7])

##print(t[2:4:7])
##print(t[2:5:2])
##print(t[::7])
##print(t[2::])
##print(t[-4:-1])
##print(t[2::7])
##
##print(t[2:7])
##print(t[:7])
##print(t[2:])
##print(t[2:7])
##

#Swapping the Values:


##t1=('A','B','C','D','E')
##t2=('abc','def','ijk','xyz','mno')
##print("Original Tuples:")
##print('t1-',t1)
##print('t2-',t2)
##t1,t2=t2,t1
##print("After Swappiing")
##print('t1-',t1)
##print('t2-',t2)

#Adding Values in Tuples:


##t=()
##print("Empty Tuple:",t)
##choice='Y'
##while choice.upper()=='Y':
## e=input("Enter the Element")
## t=t+(e,)
## print(t)
## choice=input("Do you want to continue?(y/n)")
##print(t)

##t=()
##print("Empty Tuple:",t)
##choice='Y'
##while choice.upper()=='Y':
## e=input("Enter the Element")
## t=t+(e,)
## choice=input("Do you want to continue?(y/n)")
##print(t)
##l=len(t)
##for i in range(l):
## print('At indexes',i,'and',i-l,'Element:',t[i])

##Salary of employees:
##n=int(input("Enter the Number of Employees"))
##t=()
##i=0
##while i<n:
## v=eval(input("Enter Salary of employee"))
## t=t+(v,)
## i=i+1
##print("Salaries: ",t)
##print("Maximum Salary: ",max(t))
##print("Minimum Salary: ",min(t))
##print("Sum of Salary: ",sum(t))

##Cube of Numbers
##def q():
## n=eval(input("Enter Number "))
## t=()
## for i in range(0,n):
## v=i**3
## t=t+(v,)
## return t
##def call():
## v=q()
## print(v)
##call()

##def changeword (chTuple):


## shift=3
## for i in chTuple:
## nWord+=chr(ord('A'+(ord(l)+shift-ord('A'))%26)
##

##t=tuple()
##ch='y'
##while ch=='y' or ch=='Y':
## n=input("Enter Your Name: ")
## r=int(input("Enter Your Roll no: "))
## t+=(n,r)
## ch=input("Do you want to Continue?")
##print(t)

##name=tuple()
##rno=tuple()
##marks=tuple()
##ch='y'
##while ch=='y' or ch=='Y':
## n=input("Enter your Name")
## r=int(input("Enter Your Roll no"))

##t=()
##ch='y'
##while ch=='Y' or ch=='y':
## n=input("Enter Your Name: ")
## r=int(input("Enter Your Roll no"))
## M=int(input("Enter Marks of Math"))
## S=int(input("Enter Marks of SCience"))
## C=int(input("Enter MArks of C.S"))
## E=int(input("Enter Marks of English"))
## P=int(input("Enter Marks of Physics"))
## T=M+S+C+E+P
## y=(T/500)*100
## b=(n,r,M,S,C,E,P,T,y)
## t+=(b,)
## ch=input("Do you want to Continue?")
##print(t)

##def changeWord (chTuple):


## shift=3
## for i in chTuple:
## nWord+=chr(ord('A'+(ord(l)+shift-ord('A'))%26)
## return nWord
##w=input('Enter Word in Uppercase

#DICTIONARIES#:
##print("List is a collection which is ordered and Changeable. Allows Dublicate members.")
##print()
##print("Tuple is a Collection which is Ordered and Unchangeable. Allows Dublicate members.")
##print()
##print("Dictionary is a collection which is Unordered and Changeable. No Dublicate Members.")
##print()
##print("Set is a collection which is unordered and unindexed. No Dublicate members.")
##print()
##print(Name)

##dict={'Name':'AMAN','Age':16,'Class':'11th'}
####print(dict['Age'])
####print(dict['Name'])
####dict['Age']=18
####dict['School']= "J.B. Karp Vidhyala"
####print(dict)
##dict['Roll_no']=4
##dict['Subject']='C.S'
##print(dict)
##a=dict.keys()
##b=dict.values()
##c=dict.items()
##print(c)
##print(a)
##print(b)
##del dict['Name']
##print("dict['Age']:",dict['Age'])

##dict.clear()
##print(dict)

##a=dict.get("Age")
##print(a)

##print(len(dict))

##if "Class" in dict:


## print("Yes, 'Class' is one of the Keys in the dict Dictionaries")

##
##del dict
##print(dict)

##dict.update({"Age":18})
##print(dict)

##dict.pop("Age")
##print(dict)

##dict={"Name":"ABC","Age":15,"Class":'11th'}
##for x in dict:
## print(x)
##for y in dict:
## print(dict[y])

##mydict=dict.copy()
##print(mydict)

##myClass={
## "s1":{
## "name":"Abc",
## "age":16
## },
## "s2":{
## "name":"Pqr",
## "age":18
## },
## "s3":{
## "name":"Lmn",
## "age":16
## }
## }
##print(myClass)

##
##n=int(input("How many student:"))
##winlist={}
##ch="y"
##while ch=="y" or ch=="Y":
## for i in range(n):
## p=int(input("Enter Marks of physics"))
## e=int(input("Enter Marks of english"))
## m=int(input("Enter marks of math"))
##
## winlist[k]=v
## ch=input("Enter y/n")
##print(winlist)
##

##n=int(input("How many student:"))


##winlist={}
##for i in range(n):
## k=input("Name of Students")
## v=int(input("Number of Competitions won"))
## winlist[k]=v
##rev_dict={v:k for k, v in winlist.items()}
##print(rev_dict)
##print(winlist)

##n=int(input("How many student: "))


##st={}
##for i in range(n):
## k=input("Name of Students: ")
## v=int(input("Number of Competitions won: "))
## st[k]=v
##print(st)
##ans="y"
##while ans=="y" or ans=="Y":
## v=int(input("Enter Value: "))
## for k in st:
## if st[k]==v:
## print(k,':',st[k])
## ans=input("Do you want to continue: ")

##

##Result={}
##ch="y"

##a={}
##ch="y"
##while ch=='y' or ch=='Y':
## N=input("Enter Your Name: ")
## R=int(input("Enter Your Roll no: "))
## M=int(input("Enter the Marks of Math: "))
## P=int(input("Enter the Marks of Physics: "))
## C=int(input("Enter the Marks of chemistry: "))
## E=int(input("Enter the Marks of English: "))
## CS=int(input("Enter the Marks of C.S: "))
## Tot=(M+P+C+E+CS)
## Per=(Tot/500)*100
## a[N]=R,M,P,C,E,CS,Tot,Per
## ch=input("Do you want to continue?: ")
##print(a)

##for i in range(0,5):
## for j in range(0,5):
## if i==2 or j==2 or (i==0 and j==0) or (i==0 and j==1) or (i==3 and j==0) or (i==4 and j==0) or (i==0 and j==4) or (i==1 and j==4) or (i==4 and j==3) or (i==4 an
## print("*",end=" ")
## else:
## print(" ",end=" ")
## print()

##for i in range(0,7):
## for j in range(0,5):
## if i==1
## for i in range(0,5):
## for j in range(0,5):
## if i==2 or j==2 or (i==0 and j==0) or (i==0 and j==1) or (i==3 and j==0) or (i==4 and j==0) or (i==0 and j==4) or (i==1 and j==4) or (i==4 and j==3) or (i==4 an
## print("*",end=" ")
## else:
## print(" ",end=" ")
## print()

##def sub():
## x=int(input("Enter the First No.: "))
## y=int(input("Enter the Second No.: "))
## print(x,'-',y,'=',x-y)
##def add():
## x=int(input("Enter the First No.: "))
## y=int(input("Enter the second No.: "))
## print(x,'+',y,'=',x+y)
##def mul():
## x=int(input("Enter the First No.: "))
## y=int(input("Enter the Second No.: "))
## print(x,'*',y,'=',x*y)
##def div():
## x=int(input("Enter the First No.: "))
## y=int(input("Enter the Second No.: "))
## print(x,'/',y,'=',x/y)
##def flot():
## x=int(input("Enter the First No.: "))
## y=int(input("Enter the Second No.: "))
## print(x,'//',y,'=',x//y)
##def mod():
## x=int(input("Enter the First No.: "))
## y=int(input("Enter the Second No.: "))
## print(x,'%',y,'=',x%y)
##
##def choice():
## print("1.Sub")
## print("2.Sum")
## print("3.Mul")
## print("4.Div")
## print("5.Float div")
## print("6.Modulus")
##ch='y'
##while ch=='y' or ch=='Y':
## choice()
## n=int(input("Enter your Choice: "))
## if n==1:
## sub()
## elif n==2:
## add()
## elif n==3:
## mul()
## elif n==4:
## div()
## elif n==5:
## flot()
## elif n==6:
## mod()
## else:
## print("Not Found")
## ch=input("Do you Want to Continue?: ")
## print()
##
##def sub():
## x=7
## y=4
## print(x,'-',y,'=',x-y)
##def add():
## x=289
## y=478
## print(x,'+',y,'=',x+y)
##def mul():
## x=289
## y=564
## print(x,'*',y,'=',x*y)
##def div():
## x=289
## y=478
## print(x,'/',y,'=',x/y)
##def flot():
## x=289
## y=478
## print(x,'//',y,'=',x//y)
##def mod():
## x=2897
## y=478
## print(x,'%',y,'=',x%y)
##
##def choice():
## print("1.Sub\n2.Sum\n3.Mul\n4.Div\n5.Float div\n6.Modulus")
##ch='y'
##while ch=='y' or ch=='Y':
## choice()
## n=int(input("Enter your Choice"))
## if n==1:
## sub()
## elif n==2:
## add()
## elif n==3:
## mul()
## elif n==4:
## div()
## elif n==5:
## flot()
## elif n==6:
## mod()
## else:
## print("Not Found")
## ch=input("Do you Want to Continue?")
## print()
##
##
##def arec(l,b):
## return l,b,l*b
##def atri(a):
## return a,(1.7*a*a)/4
##def asq(s):
## return s,s*s
##def acir(r):
## return r,3.14*r*r
##def prec(l,b):
## return l,b,2*(l+b)
##def psqr(s):
## return s,4*s
##def pcir(r):
## return r,2*3.14*r
##def ptri(a):
## return a,3*a
##def menu():
## print("1.Area")
## print("2.Perimeter")
##def menu2():
## print("1.Rectangle")
## print("2.Square")
## print("3.Circle")
## print("4.Triangle")
##
##ch='y'
##while ch=='Y' or ch=='y':
## menu()
##
##
## a=int(input("Enter the choice: "))
##
## if a==1:
## menu2()
##
##
## B=int(input("Enter the choice: "))
## if B==1:
## l=int(input("Length: "))
## b=int(input("bredth: "))
## print(arec(l,b))
## elif B==2:
## s=int(input("Side: "))
## print(asq(s))
## elif B==3:
## r=int(input("Radius: "))
## print(acir(r))
## elif B==4:
## a=int(input("Side: "))
## print(atri(a))
## else:
## print("Not Found")
## elif a==2:
## menu2()
##
##
## B=int(input("Enter the choice: "))
## if B==1:
## l=int(input("Length: "))
## b=int(input("bredth: "))
## print(prec(l,b))
## elif B==2:
## s=int(input("Side: "))
## print(psqr(s))
## elif B==3:
## r=int(input("Radius: "))
## print(pcir(r))
## elif B==4:
## a=int(input("Side: "))
## print(ptri(a))
## else:
## print(" Not Found ")
##
## else:
## print(" Shape Not found")
## ch=input(" Do you want to continue?: ")
##print()

##import random
##myNumber=random.randint(0,5)
##COLOR=["YELLOW","WHITE","BLACK","RED"]
##for I in range(0,myNumber):
## print(COLOR[I],end="*")
## print()
##

##import random
##Signal=['RED','YELLOW',"GREEN"]
##for K in range(1,0,-2):
## R=random.randrange(K)
## print(Signal[R],end='#')

##import random
##m=[5,10,15,20,25,30]
##for i in range(1,7):
## first=random.randint(2,5)
## sec=random.randint(0,5)
## third=random.randint(1,2)
## print(m[first],m[sec],m[third],sep="#")
##
##def callon(b=20,a=10):
## b=b+a
## a=b-a
## print(b,'#',a)
## return b
##x=100
##y=200
##x=callon(x,y)
##print(x,"@",y)
##y=callon(y)
##print(x,"@",y)
##

s="Racer Car Radar"


L=s.split()
for W in L:
x=W.upper()
if x==x[::-1]:
for l in x:
print(l,end="*")
else:
for l in W:
print(l,end="#")
print()

You might also like