tag:blogger.com,1999:blog-16325019576982686212024-03-09T03:23:25.654+05:30Python Programs XISearch the Python Program that you wantMilan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.comBlogger51125tag:blogger.com,1999:blog-1632501957698268621.post-28938251378402784242020-10-18T18:44:00.001+05:302020-10-18T18:45:41.029+05:30Python Program to input any character and print box of that<p> </p><p><br /></p><p><span style="font-family: courier;">x=input('Enter the charcater: ') </span></p><p><span style="font-family: courier;">r=int(input('Enter the no. of rows: ')) </span></p><p><span style="font-family: courier;">c=int(input('Enter the no. of columns: ')) </span></p><p><span style="font-family: courier;">print(x*c) </span></p><p><span style="font-family: courier;">ns=x+' '*(c-2)+x </span></p><p><span style="font-family: courier;">for i in range (r-2): </span></p><p><span style="font-family: courier;"> print(ns) </span></p><p><span style="font-family: courier;">print(x*c)</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><br /></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com1tag:blogger.com,1999:blog-1632501957698268621.post-27392267487363159732020-09-22T17:44:00.002+05:302020-09-22T17:44:29.643+05:30Python Program to print star(*) rhombus of side length 3.<p><br /></p><p><span style="font-family: courier;">n=3</span></p><p><span style="font-family: courier;">j=n-1</span></p><p><span style="font-family: courier;">print(' '*(n)+'*')</span></p><p><span style="font-family: courier;">for i in range(1,2*n):</span></p><p><span style="font-family: courier;"> if i>n:</span></p><p><span style="font-family: courier;"> print(' '*(i-n)+'*'+' '*(2*j-1)+'*')</span></p><p><span style="font-family: courier;"> else:</span></p><p><span style="font-family: courier;"> print(' '*(n-i)+'*'+' '*(2*i-1)+'*')</span></p><p><span style="font-family: courier;">if n>1:</span></p><p><span style="font-family: courier;"> print(' '*n+'*')</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><br /></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-79953377265496689902020-09-22T11:18:00.002+05:302020-09-22T11:18:34.250+05:30Python program to calculate the area of a trapezoid.<p> </p><p><span style="font-family: courier;">height = float(input("Height of trapezoid: "))</span></p><p><span style="font-family: courier;">base_1 = float(input('Base one value: '))</span></p><p><span style="font-family: courier;">base_2 = float(input('Base two value: '))</span></p><p><span style="font-family: courier;">area = ((base_1 + base_2) / 2) * height</span></p><p><span style="font-family: courier;">print("Area is:", area)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-82700745884374331872020-09-22T11:03:00.005+05:302020-09-22T11:04:06.945+05:30Python program to convert radian to degree<p><br /></p><p><span style="font-family: courier;">pi=22/7</span></p><p><span style="font-family: courier;">radian = float(input("Input radians: "))</span></p><p><span style="font-family: courier;">degree = radian*(180/pi)</span></p><p><span style="font-family: courier;">print(degree)</span></p><p><br /></p><p><br /></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-42462590942435657442020-09-21T10:22:00.005+05:302020-09-21T10:22:39.404+05:30Python program to convert degree to radian.<p> </p><p><span style="font-family: courier;">pi=22/7</span></p><p><span style="font-family: courier;">degree = float(input("Input degrees: "))</span></p><p><span style="font-family: courier;">radian = degree*(pi/180)</span></p><p><span style="font-family: courier;">print(radian)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-58254444053851843732020-09-14T21:38:00.002+05:302020-09-14T21:38:06.862+05:30Python Program to print a kajukatri shape<p><br /></p><p><span style="font-family: courier;">n=7
</span></p><p><span style="font-family: courier;">spc=n*2+1
</span></p><p><span style="font-family: courier;">for row in range(1,n+1):
</span></p><p><span style="font-family: courier;"> x=''
</span></p><p><span style="font-family: courier;"> x=' '*spc </span></p><p><span style="font-family: courier;"> for col in range(1,row+1):
</span></p><p><span style="font-family: courier;"> x=x+str(col)+' ' </span></p><p><span style="font-family: courier;">
</span></p><p><span style="font-family: courier;">for col in range(row-1,0,-1):
</span></p><p><span style="font-family: courier;"> x=x+str(col)+' '
</span></p><p><span style="font-family: courier;"> print(x)
</span></p><p><span style="font-family: courier;">spc=spc-2 </span></p><p><span style="font-family: courier;">spc=spc+4
</span></p><p><span style="font-family: courier;">for row in range(n-1,0,-1):
</span></p><p><span style="font-family: courier;"> x=''
</span></p><p><span style="font-family: courier;"> x=' '*spc </span></p><p><span style="font-family: courier;"> for col in range(1,row+1):
</span></p><p><span style="font-family: courier;"> x=x+'* '
</span></p><p><span style="font-family: courier;"> for col in range(row-1,0,-1):
</span></p><p><span style="font-family: courier;"> x=x+'* '
</span></p><p><span style="font-family: courier;"> print(x)
</span></p><p><span style="font-family: courier;"> spc=spc+2</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-65883481533593403712020-09-12T22:39:00.006+05:302020-09-12T22:40:34.839+05:30Python Program to input and string and print total number of characters in that (without len()) # working of len() function<p><br /></p><p><span style="font-family: courier;">str = input('Enter String')</span></p><p><span style="font-family: courier;">c=0</span></p><p><span style="font-family: courier;">str=list(str)</span></p><p><span style="font-family: courier;">while str !=[]:</span></p><p><span style="font-family: courier;"> c+=1</span></p><p><span style="font-family: courier;"> str.pop()</span></p><p><span style="font-family: courier;">print(c)</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-1981692971975435202020-09-12T22:35:00.007+05:302020-09-12T22:35:42.686+05:30Python Program to print all permutations using those three variables a,b,c=0,0,0. Output : 000,001,…… 999<p><br /></p><p><span style="font-family: courier;">for i in range (10):</span></p><p><span style="font-family: courier;"> for j in range(10):</span></p><p><span style="font-family: courier;"> for k in range (10):</span></p><p><span style="font-family: courier;"> x=str(i)+str(j)+str(k)</span></p><p><span style="font-family: courier;"> print (x)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-170791744896790842020-09-12T22:05:00.003+05:302020-09-12T22:06:29.778+05:30Python Program to input any sentence and sub-string print the index of given sub-string if found else print -1<p> </p><p><span style="font-family: courier;">mainstring=input('Enter any sentence : ')
</span></p><p><span style="font-family: courier;">tofind=input('Enter any word to find : ')
</span></p><p><span style="font-family: courier;">l1=len(tofind)
</span></p><p><span style="font-family: courier;">temp=False
</span></p><p><span style="font-family: courier;">for i in range(len(mainstring)-l1+1):
</span></p><p><span style="font-family: courier;"> twochar=mainstring[i:i+l1]
</span></p><p><span style="font-family: courier;"> if twochar==tofind:
</span></p><p><span style="font-family: courier;"> #print('Found at index : ',i)
</span></p><p><span style="font-family: courier;"> temp=True
</span></p><p><span style="font-family: courier;"> break
</span></p><p><span style="font-family: courier;">if temp==True:
</span></p><p><span style="font-family: courier;"> print('Found at index : ',i)
</span></p><p><span style="font-family: courier;">else:
</span></p><p><span style="font-family: courier;"> print('Not found at ',-1)</span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;"><br /></span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-32748551161110669392020-09-12T21:53:00.000+05:302020-09-12T21:53:58.038+05:30Python Program to input a string and check whether it is palindrome or not<p><br /></p><p><span style="font-family: courier;">original=input('Enter Any Number : ')
</span></p><p><span style="font-family: courier;">reverse=original[::-1]
</span></p><p><span style="font-family: courier;">if original==reverse:
</span></p><p><span style="font-family: courier;"> print('The number you entered is a palindrome number!')
</span></p><p><span style="font-family: courier;">else:
</span></p><p><span style="font-family: courier;"> print('The number you entered is not a palindrome number!')
</span></p><p><br /></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-1815444246273955992020-09-12T21:39:00.000+05:302020-09-12T21:39:01.029+05:30Python Program to input any number and print a star triangle<p><br /></p><p><span style="font-family: courier;">num=int(input('Enter any value : '))
</span></p><p><span style="font-family: courier;">for i in range(num+1):
</span></p><p><span style="font-family: courier;"> print('*'*i)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-54168759486697301442020-09-12T00:34:00.002+05:302020-09-12T00:34:10.357+05:30Python Program to input any sentence and reverse it word by word<p><br /></p><p><span style="font-family: courier;">sen=input('enter sentence')</span></p><p><span style="font-family: courier;">r=sen.split(' ')</span></p><p><span style="font-family: courier;">x=' '</span></p><p><span style="font-family: courier;">for i in r:</span></p><p><span style="font-family: courier;"> x+=i[::-1]+' '</span></p><p><span style="font-family: courier;">print(x)</span></p><p><span style="font-family: courier;"> </span></p><p><span style="font-family: courier;"> </span></p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p><br /></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-39361868994476701382020-09-05T22:46:00.003+05:302020-09-05T22:46:56.569+05:30 PythonProgram to input decimal number and print binary of the number<div><br /></div><div><span style="font-family: courier;">x=''</span></div><div><span style="font-family: courier;">n=int(input('Enter any n'))</span></div><div><span style="font-family: courier;">while n>0:</span></div><div><span style="font-family: courier;"> rem=n%2</span></div><div><span style="font-family: courier;"> n=n//2</span></div><div><span style="font-family: courier;"> x=x+str(rem)</span></div><div><span style="font-family: courier;">print(x[::-1])</span></div>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-51677933240910331772020-09-03T22:39:00.002+05:302020-09-03T22:39:15.025+05:30Python Program to print the reverse order of string <p><br /></p><p><span style="font-family: courier;">str=input("Enter word")</span></p><p><span style="font-family: courier;">s=str.reverse</span></p><p><span style="font-family: courier;">print(s)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-84449823512020854132020-09-02T21:59:00.005+05:302020-09-02T21:59:56.318+05:30 Python Program to Input 3 variable's value and print the biggest variable<p> </p><p><span style="font-family: courier;">x =int( input ( 'Enter x' )) </span></p><p><span style="font-family: courier;">y =int( input ( 'Enter y' )) </span></p><p><span style="font-family: courier;">z =int( input ( 'Enter z' )) </span></p><p><span style="font-family: courier;">if (x>=y and x>=z): </span></p><p><span style="font-family: courier;"> print (x, ' is greatest' ) </span></p><p><span style="font-family: courier;">elif (y>=z and y>=z): </span></p><p><span style="font-family: courier;"> print (y, ' is greatest' ) </span></p><p><span style="font-family: courier;">else : </span></p><p><span style="font-family: courier;"> print (z, ' is greatest' )</span></p><p><br /></p><p><br /></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-37434341489840387172020-09-02T21:58:00.002+05:302020-09-02T21:58:22.969+05:30Python Program to Input no. of persons ,sales amt.amt. Find commission of that person based on given condition sales amt. comm<div><br /></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">'''0-10000 10% </span></div><div><span style="font-family: courier;">10001-20000 20% </span></div><div><span style="font-family: courier;">20001-50000 25% </span></div><div><span style="font-family: courier;">>50000 30% ''' </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">no=int( input ( 'Enter person number' )) </span></div><div><span style="font-family: courier;">sa=int( input ( 'Enter sales amt' )) </span></div><div><span style="font-family: courier;">com =0 </span></div><div><span style="font-family: courier;">if (sa>= 0 and sa<= 10000 ): </span></div><div><span style="font-family: courier;"> com= 0.1 * sa </span></div><div><span style="font-family: courier;">elif (sa<= 20000 and sa> 10000 ): </span></div><div><span style="font-family: courier;"> com= 0.2 * sa </span></div><div><span style="font-family: courier;">elif (sa> 20000 and sa<= 50000 ): </span></div><div><span style="font-family: courier;"> com= 0.25 * sa </span></div><div><span style="font-family: courier;">else : </span></div><div><span style="font-family: courier;"> com= 0.3 * sa </span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">print ( 'Number of person = ' , no) </span></div><div><span style="font-family: courier;">print ( 'Sale amount = ' , sa) </span></div><div><span style="font-family: courier;">print ( 'Comission = ' ,com) </span></div><div><span style="font-family: courier;">print ( 'Comission + sales = ' ,(sa+com))</span></div><div><br /></div><div><br /></div>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-90394506421948930422020-08-29T00:36:00.007+05:302020-08-29T00:36:57.684+05:30Python Program to input any sentence and create a dictionary with consonant and vowels.<p><br /></p><p><span style="font-family: courier;">name= input ( 'Enter Any Sent.?' )</span></p><p><span style="font-family: courier;">v_cnt=c_cnt=oth_cnt= 0 </span></p><p><span style="font-family: courier;">vowels= 'aeiou'</span></p><p><span style="font-family: courier;">for i in name : </span><span style="font-family: courier;"> </span></p><p><span style="font-family: courier;"> if i.isalpha (): </span></p><p><span style="font-family: courier;"> if i in vowels : </span></p><p><span style="font-family: courier;"> v_cnt+= 1 </span></p><p><span style="font-family: courier;"> else : </span></p><p><span style="font-family: courier;"> c_cnt+= 1</span></p><p><span style="font-family: courier;"> else : </span></p><p><span style="font-family: courier;"> oth_cnt+= 1</span></p><p><span style="font-family: courier;">print ( v_cnt , c_cnt ) </span></p><p><span style="font-family: courier;">d1= { 'consonant' : c_cnt , 'vowels' : v_cnt , 'Other' : oth_cnt }</span></p><p><span style="font-family: courier;">print ( d1 )</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-61124213746600146152020-08-29T00:31:00.008+05:302020-08-29T00:32:28.596+05:30 Python program to combine two dictionary adding values for common keys<p> </p><p><span style="font-family: courier;">d1 = {'a': 100, 'b': 200, 'c':300}</span></p><p><span style="font-family: courier;">d2 = {'a': 300, 'b': 200, 'd':400} </span></p><p><span style="font-family: courier;">d=dict()</span></p><p><span style="font-family: courier;">for i in d2:</span></p><p><span style="font-family: courier;"> if i in d2:</span></p><p><span style="font-family: courier;"> d[i]=d1[i]+d2[i]</span></p><p><span style="font-family: courier;"> else:</span></p><p><span style="font-family: courier;"> d.update(d1)</span></p><p><span style="font-family: courier;"> d.update(d2)</span></p><p><span style="font-family: courier;">print(d)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-54160270921102888992020-08-29T00:28:00.002+05:302020-08-29T00:28:19.811+05:30Python script to generate and print a dictionary that contains a number (between 1 and n) in the form (number, square of number)<p><br /></p><p><span style="font-family: courier;">n=int(input('Enter Any number ?')) </span></p><p><span style="font-family: courier;">d=dict()</span></p><p><span style="font-family: courier;">for i in range(1,n+1):</span></p><p><span style="font-family: courier;"> print(d.update({i:i*i}))</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-6849912489993540312020-08-29T00:25:00.002+05:302020-08-29T00:25:58.946+05:30Python script to concatenate following dictionaries to create a new one. <p><br /></p><p><span style="font-family: courier;">dic1={1:10, 2:20} </span></p><p><span style="font-family: courier;">dic2={3:30, 4:40}</span></p><p><span style="font-family: courier;">dic3={5:50,6:60}</span></p><p><span style="font-family: courier;">dic1.update(dic2)</span></p><p><span style="font-family: courier;">dic1.update(dic3)</span></p><p><span style="font-family: courier;">d4=dic1</span></p><p><span style="font-family: courier;">print(d4)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-88159087660157637612020-08-29T00:20:00.009+05:302020-08-29T00:20:57.085+05:30Python Program that reads a string and display it in reverse order.<p><br /></p><p><span style="font-family: courier;">Str=input('enter any string')</span></p><p><span style="font-family: courier;">l=len(str)</span></p><p><span style="font-family: courier;">a=str[::-1]</span></p><p><span style="font-family: courier;">print(' original string ',Str)</span></p><p><span style="font-family: courier;">print(' reversed string ',a) </span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-6925144583674076242020-08-25T00:32:00.004+05:302020-08-25T00:32:47.908+05:30Python Program to input any string and substring and search for substring and print the occurrence of substring in main string if it is there<p> </p><p><span style="font-family: courier;"># To understand find or search and index function</span></p><p><span style="font-family: courier;">str = input ('Enter any sentence: ')</span></p><p><span style="font-family: courier;">str=str.lower()</span></p><p><span style="font-family: courier;">print (str)</span></p><p><span style="font-family: courier;">ch = input ('Enter character to be found: ')</span></p><p><span style="font-family: courier;">occ= int (input('Enter occurance of character to be found: ') )</span></p><p><span style="font-family: courier;">c=str.count(ch)</span></p><p><span style="font-family: courier;">if (occ>c):</span></p><p><span style="font-family: courier;"> print ('Not Found')</span></p><p><span style="font-family: courier;">else:</span></p><p><span style="font-family: courier;"> for j in range (len(str)):</span></p><p><span style="font-family: courier;"> i=str[j]</span></p><p><span style="font-family: courier;"> if i==ch:</span></p><p><span style="font-family: courier;"> c-=1</span></p><p><span style="font-family: courier;"> if c==0:</span></p><p><span style="font-family: courier;"> print (occ,'occerance of ',ch,' is at position:',j)</span></p><p><span style="font-family: courier;"> break</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-21521388240547102662020-08-25T00:24:00.003+05:302020-08-25T00:24:38.955+05:30Python Program to input any string and differenciat vowels and consonants<p> </p><p><span style="font-family: courier;">sen=input('Enter a sentence.. ')</span></p><p><span style="font-family: courier;">a=' '</span></p><p><span style="font-family: courier;">b=' '</span></p><p><span style="font-family: courier;">for i in sen:</span></p><p><span style="font-family: courier;"> if i in 'aeiou':</span></p><p><span style="font-family: courier;"> a=a+i</span></p><p><span style="font-family: courier;"> elif i==' ':</span></p><p><span style="font-family: courier;"> continue</span></p><p><span style="font-family: courier;"> else:</span></p><p><span style="font-family: courier;"> b=b+i</span></p><p><span style="font-family: courier;">print('vowels=',a,'consonants=',b)</span></p><p><span style="font-family: courier;"><br /></span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-30416117581414183302020-08-25T00:20:00.006+05:302020-08-25T00:27:36.991+05:30Python Program to input any string and print words starts with consonant and vowels inthe different list<div><br /></div><div><span style="font-family: courier;">str = input ('Enter any sentence')</span></div><div><span style="font-family: courier;">str+=' '</span></div><div><span style="font-family: courier;">ns=''</span></div><div><span style="font-family: courier;">vo_word=[]</span></div><div><span style="font-family: courier;">conso_word=[]</span></div><div><span style="font-family: courier;">for ch in str:</span></div><div><span style="font-family: courier;"> if (ch==' '):</span></div><div><span style="font-family: courier;"> c1=ns[0]</span></div><div><span style="font-family: courier;"> if (c1 in 'AEIOUaeiou'):</span></div><div><span style="font-family: courier;"> vo_word.append (ns)</span></div><div><span style="font-family: courier;"> else:</span></div><div><span style="font-family: courier;"> conso_word.append (ns)</span></div><div><span style="font-family: courier;"> ns=''</span></div><div><span style="font-family: courier;"> elif (ch=='.'):</span></div><div><span style="font-family: courier;"> pass</span></div><div><span style="font-family: courier;"> else:</span></div><div><span style="font-family: courier;"> ns+=ch</span></div><div><span style="font-family: courier;">print ('Original string :', str)</span></div><div><span style="font-family: courier;">print ('Vowel words:', vo_word)</span></div><div><span style="font-family: courier;">print ('Consonant words: ',conso_word)</span></div>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0tag:blogger.com,1999:blog-1632501957698268621.post-43767300921647408212020-08-25T00:07:00.006+05:302020-08-25T00:07:49.549+05:30Python Program to input any number(N) and print sum of 1 to N.<p><br /></p><p><span style="font-family: courier;">n=int(input('Enter Any Number ?'))</span></p><p><span style="font-family: courier;">sum=0</span></p><p><span style="font-family: courier;">for i in range(1,n+1):</span></p><p><span style="font-family: courier;"> sum=sum+i</span></p><p><span style="font-family: courier;">print(sum)</span></p>Milan Prajapatihttp://www.blogger.com/profile/16777718852536282776noreply@blogger.com0