Programme
1(a)
from
turtle import*
for
i in range(8):
rt(45)
circle(50)
programme
1(b)
from
turtle import*
i=0
while(i<8):
rt(45)
circle(50)
programme
2(a)
from
turtle import*
for
i in range(8):
rt(45)
circle(30)
circle(40)
circle(50)
circle(60)
circle(70)
circle(80)
circle(90)
programme
2(b)
from
turtle import*
for
i in range(8):
rt(45)
for
j in range(30,91,10):
circle(j)
programme
3
n=input(“enter
a number:”)
if(n>10):
print”greater than ten”
else:
print”less than ten”
programme
4
for
i in range(1,11):
print i
programme
5
for
i in range(5,51,5):
print i
programme
6
for
i in range(2,21,2):
print i
programme
7
for
i in range(3,31,3):
print i
programme
8
for
i in range(10,1,-2):
print i
programme
9
def
sum(a,b):
c=a+b
return c
programme
10(a)
s=raw_input(“enter
a name:”)
n=len(s)
for
i in range(n+1):
print s[:i]
programme
10(b)
s=raw_input(“enter
a name:”)
n=len(s)
i=1
while(i<n):
print s[:i]
i=i+1
programme
11
a=raw_input(“enter
your name:”):
n=len(a)
print
n
No comments:
Post a Comment