Nterms Int (Input (Enter Num) )
Nterms Int (Input (Enter Num) )
n1,n2=0,1
count=0
if nterms<=0:
print("enter pos num")
elif nterms>=1:
print("fibo series upto",nterms)
print(n1)
else:
print(fibonacci sequence)
while count<nterms:
print(n1)
n=n1+n2
n1=n2
n2=n
count+=1
celsius=float(input(enter a temp:\n))
f=(1.8*celsius)+32
print("temp in f",f)
if f>32:
print("beloew f")
else:
print("above")
def toh(n,source,destination,auxiliary)
if n==1:
print("move from disk 1",source,"to destination",destination)
return
toh(n-1,source,auxiliary,destination)
print("move disk",n,"from source",source,"to destination",destination)
toh(n-1,auxiliary,destination,source)
n=3/n=int(input(enter the num))
toh(n,'a','b','c')
import re
frequenc={}
document_text=open(test.txt,'r')
text_string=document_text.read().lower()
match pattern=re.findall(r'\b[a-z]{1,15}\b',text_string)
for word in match pattern
count=frequency.get(word,0)
frequency(word)=count++1
frequency_list=frequency.keys()
for words in frequency_list
print(words,frequency(words))
test list=['correction','stion','frequency','ion','ststion']
print("the original list is"+str(test list))
subs='tion'
res=0
for i in test list:
if i.find(subs)!=-1:
res+=1
printf("all the strings count with given subssttrinf are"+str(res))
class BinaryTreeNode:
def__init__(self,data):
self.data=data
self.leftchild=none
self.rightchild=none
node1= BinaryTreeNode(80)
node2= BinaryTreeNode(67)
node3= BinaryTreeNode(56)
node4= BinaryTreeNode(12)
node5= BinaryTreeNode(89)
node6= BinaryTreeNode(56)
node7= BinaryTreeNode(34)
node1.rightchild=node2
node1.leftchild=node3
node2.rightchild=node4
node2.leftchild=node5
node3.rightchild=node6
node3.leftchild=node7
print("leftnode is")
print(node1.leftchild.data)
print("leftnode is")
print(node2.leftchild.data)
print("leftnode is")
print(node3.leftchild.data)
print("leftnode is")
print(node4.leftchild)
print("leftnode is")
print(node5.leftchild)
print("leftnode is")
print(node6.leftnode)
print("leftnode is")
print( node7.leftchild.data)
#global variable{
i=0
def monkey_g0_box(x,y):
global i
i=i+1
print('step',i,'monkey slave',x,'go to',+y)
def monkey_move_box(x,y):
global i
i=i+1
print('step',i,'monkey take the box from',x,'delivery to',+y)
def monkey_g0_box():
global i
i=i+1
print('step',i,'monkey climbs up the box')
def monkey_g0_box():
global i
i=i+1
print('step',i,'monkey picked a banana')
}
codeIn=sys.stdin.read()
codeInlist= codeIn.split()
monkey=
banana =
box=
print("the steps are as follows")