In industrial fabrication of plastics, waste is produced. This waste, contain poisonous compounds. Before a safe disposal, into the environment, it must first be treated, and the poisonous compounds, removed from the waste. The poisonous compound has been found to naturally decompose after some days, after which, the waste can be safely disposed into the environment. A computer has been dedicated to automatically discharge the waste to the environment, through an outlet valve when it has found the waste to be harmless after some days. After some years, the computer developed an irreparable fault, that needed to be replaced. As a seasoned Environmental Engineer, you’ve been employed to develop a program that can run on this new computer to do just that. Develop an algorithm that solves the problem. Implement your algorithm in python
In industrial fabrication of plastics, waste is produced. This waste, contain poisonous compounds. Before a safe disposal, into the environment, it must first be treated, and the poisonous compounds, removed from the waste. The poisonous compound has been found to naturally decompose after some days, after which, the waste can be safely disposed into the environment. A computer has been dedicated to automatically discharge the waste to the environment, through an outlet valve when it has found the waste to be harmless after some days.
After some years, the computer developed an irreparable fault, that needed to be replaced. As a seasoned Environmental Engineer, you’ve been employed to develop a
- Develop an
algorithm that solves the problem.
Implement your algorithm in python
a) Algorithm that solves the problem
- Start
- Declare i ,j
- Read the concentration of the compound
- Set i = the concentration of the compound
- Read the concentration of waste in the compound
- Set j = the concentration of the compound
- if (j<0.5*i)
- Print "Compound can be safely disposed"
- else
- Print " Compound is harmful"
b) Python Script
Code:
# Input data
i = int(input("Enter the concentration of the compound : "))
j = int(input("Enter the concentration of waste in the compound : "))
# Apply algorithm
if(j<0.5*i):
print("Compound can be safely disposed")
else:
print("Compound is harmful")
Step by step
Solved in 4 steps with 2 images