Ex.
No : 1(a)
ELECTRICITY BILLING
Date :
PROBLEM STATEMENT:
In real time the electricity billing calculation is of different range
with different rates considering the free unit for every range like(100 unit free for every
consumer) and within 200 units rate vary accordingly and within 500 units the range is
for(1-200 and 201-500) and above 500 the range is for (1-200,201-500 and >500). Fixed
rate is different for different range.
FLOWCHART
Start
Read the unit values
yes amount=
Unit<=100 0
no
yes
amount=20+(unit-100)*1.5
Unit<=200
no
yes Unit<=200 yes
amount=30+(unit-100)*2
Unit<=500
no no amount=30+(unit-100)*3
Unit>500 yes Unit<=200 yes
amount=50+(unit-100)*3.5
no
yes
Unit<=500 amount=50+(unit-100)*4.6
NO amount=50+(unit-100)*6.6
Print amount
end
RESULT:
Thus the electricity billing calculations in real time were identified and solved.
Ex. No : 1(b)
RETAILSHOP BILLING
Date :
PROBLEM STATEMENT:
In real time the retail shop offers to the customer if customer buys an item above Rs.50, the
shop discount amount as % of the item price. First calculate discount rate, discounted amount and
discounted price. Finally display the actual price of the item, discount rate and price after
discounted price of the item.
FLOWCHART start
Price=input(“enter the
price of your item”)
If price>=50
No
Yes
Dis_rate=input (“enter the
percentage of Discount)
Discount=price*Dis_rate/100
Discouted_price=price-
Print(“price before
discount = Rs.”
Print(“discount
rate=Rs.”
Print(“discount amount =
Rs. “+Discount)
Print(“Price after
Discount=Rs.”+Disounted_pric
RESULT:
Thus the Retail shop billing calculation in real time were identified and solved.
Ex. No : 1(c)
SINE SERIES
Date :
PROBLEM STATEMENT:
1. In mathematical series, the sine series used to identify and solve scientific problems. In this
initialize i=1 and read the inputs as x and n. X is the angle in degree which is converted into
radian. Then initialize y =x for finally printing the sine value and Process x=x*3.1415/180
which is Converting ‘x’ to radian value Then it assigns t=x and sum=x. Check the condition
if i <=n, then the loop continues till the condition of the loop is true. Calculate the sine
series using t=(t*(-1)*x*x)/(2*i*(2*i+1)). Calculate the sum, sum= sum + t. Finally print
the sine value and sine series value (sum value).
FLOWCHART
Start
i=1
Read x, n
y=x
x=x*3.1415/180
t=x, sum=x
loop
No
i<=n
t=(t*(-1)*x*x)/(2*i*(2*i+1)
sum=sum+t
Print ” sin ”+(y)
print “ is “+sum
end
RESULT:
Thus the sine series calculation in real time were identified and solved.
Ex. No : 1(d)
WEIGHT OF A STEEL BAR
Date :
PROBLEM STATEMENT:
In mathematical theory, the weight of a steel bar calculated using formula
W= D2/ *XL
162.2
Read the diameter (D) and length (L) then applying the above formula to calculate the weight and print it.
FLOWCHART
start
Read D, L
Wt = D2 / 162.2XL
Print Wt
End
RESULT:
Thus the weight of a steel bar calculation in real time was identified and solved.