Python Programs for 11
290 FOLLOWERS
Python Programs for 11 is a blog to search the Python Program that you want and output findings.
Python Programs for 11
3y ago
x=input('Enter the charcater: ')
r=int(input('Enter the no. of rows: '))
c=int(input('Enter the no. of columns: '))
print(x*c)
ns=x+' '*(c-2)+x
for i in range (r-2):
print(ns)
print(x*c ..read more
Python Programs for 11
3y ago
n=3
j=n-1
print(' '*(n)+'*')
for i in range(1,2*n):
if i>n:
print(' '*(i-n)+'*'+' '*(2*j-1)+'*')
else:
print(' '*(n-i)+'*'+' '*(2*i-1)+'*')
if n>1:
print(' '*n ..read more
Python Programs for 11
3y ago
height = float(input("Height of trapezoid: "))
base_1 = float(input('Base one value: '))
base_2 = float(input('Base two value: '))
area = ((base_1 + base_2) / 2) * height
print("Area is:", area ..read more
Python Programs for 11
3y ago
pi=22/7
radian = float(input("Input radians: "))
degree = radian*(180/pi)
print(degree ..read more
Python Programs for 11
3y ago
pi=22/7
degree = float(input("Input degrees: "))
radian = degree*(pi/180)
print(radian ..read more
Python Programs for 11
3y ago
n=7
spc=n*2+1
for row in range(1,n+1):
x=''
x=' '*spc
for col in range(1,row+1):
x=x+str(col)+' '
for col in range(row-1,0,-1):
x=x+str(col)+' '
print(x)
spc=spc-2
spc=spc+4
for row in range(n-1,0,-1):
x=''
x=' '*spc
for col in range(1,row+1):
x=x+'* '
for col in range(row-1,0,-1):
x=x+'* '
print(x)
spc=s ..read more
Python Programs for 11
3y ago
str = input('Enter String')
c=0
str=list(str)
while str !=[]:
c+=1
str.pop()
print(c ..read more
Python Programs for 11
3y ago
for i in range (10):
for j in range(10):
for k in range (10):
x=str(i)+str(j)+str(k)
print (x ..read more
Python Programs for 11
3y ago
mainstring=input('Enter any sentence : ')
tofind=input('Enter any word to find : ')
l1=len(tofind)
temp=False
for i in range(len(mainstring)-l1+1):
twochar=mainstring[i:i+l1]
if twochar==tofind:
#print('Found at index : ',i)
temp=True
break
if temp==True:
print('Found at index : ',i)
else:
print('Not found at ',-1 ..read more
Python Programs for 11
3y ago
original=input('Enter Any Number : ')
reverse=original[::-1]
if original==reverse:
print('The number you entered is a palindrome number!')
else:
print('The number you entered is not a palindrome number ..read more