Grass in a grassland stores kJ of energy. It feeds a chain of four more levels. You will list the energy at each level with the ten per cent law. Then you will find the first level that gets less than kJ, and the share of the grass's energy that reaches the top.
The idea. Each level gets a tenth of the energy of the level below.
Your tasks.
energy to the list of energies, in kJ, at the five levels, starting with the grass.first_low to the name of the first level that gets less than kJ.top_percent to the energy at the top as a percentage of the grass's energy.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…