Electricity Bills calculator…
take=input('Enter Units Consumed ');
reading=take;
ans=0;
while(ans==0)
if
reading>400
ans=reading*10;
elseif(reading>300)&&(reading<=400)
ans=units*8;
elseif(reading>200)&&(reading<=300)
ans=reading*6;
elseif(reading>0)&&(reading<=200)
ans=reading*5;
end;
end;
disp('Total
Cost Is ');
disp(ans);
No comments:
Post a Comment