0% found this document useful (0 votes)
29 views1 page

Survey J Component Coding Guide

Uploaded by

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

Survey J Component Coding Guide

Uploaded by

Akash K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

#SURVEY J COMPONENT CODE

print(" SURVEY J COMPONENT CODING","\n"," (mid and average


ordinate rule)")
lst=[]
n=int(input("ENTER THE NUMBER OF ORDINATES : "))
d=float(input("ENTER THE COMMON DISTANCE (in m): "))
l=(n-1)*d
print(" ENTER THE ORDINATE VALUES ONE BY ONE : ")
sum=0
for i in range(0, n):
print("ENTER THE ORDINATE ",(i+1),": ",end="")
ordinate=float(input())
[Link](ordinate)
for i in lst:
sum=sum+i
A=(sum/n)*l
H_sum=0
N=number_of_divisions=n-1
for e in range(0,N):
H=(lst[e]+lst[e+1])/2
H_sum=H_sum+H
M=(H_sum)*d
print("By Average Ordinate Rule","\n","COMPUTED AREA = ",round(A,2),"sq. metres")
print("By Mid Ordinate Rule","\n","COMPUTED AREA = ",round(M,2),"sq. metres")

You might also like