Question 1
In this question we will write a function to compare the suitability of various alien planets for a space
colony.
Make up the names of 5 alien planets and enter these in cells B5-B9 of Sheet 1 in your file. For each
planet make up in the same row of the sheet a temperature (between -200 and +200 ) in column C,
an oxygen percentage (between 0 and 100 ) in column D, and a radiation level chosen from "None",
"Low", "High", and "Lethal" in column E.
Write a function which takes as input a planet name and returns a message as follows:
If the planet is not on the list then return "Pick another planet".
If the temperature is less than -60 or greater than +80 , or the oxygen level is less than 8 , or
the radiation level is Lethal, return " x is not habitable" where x is the name of the planet.
If the temperature is between 0 and 30 , the oxygen level is at least 17 , and the radiation
level is None, return " x is ideal" where x is the name of the planet.
Otherwise return " x is habitable, but not ideal" where x is the name of the planet.
Question 1 In this question we will write a function to compare the suitability of various alien planets for a space colony.
Make up the names of 5 alien planets and enter these in cells B5--B9 of Sheet 1 in your file. For each planet make up in the same row of the sheet a temperature (between -200 and +200) in column C an oxygen percentage (between 0 and 100) in column D, and a radiation level chosen from "None", "Low", "High", and "Lethal" in column E.
Write a function which takes as input a planet name and returns a message as follows:
If the planet is not on the list then return "Pick another planet"
If the temperature is less than -60 or greater than +80, or the oxygen level is less than 8, or the radiation level is Lethal, return "x is not habitable" where x is the name of the planet.
If the temperature is between 0 and 30, the oxygen level is at least 17, and the radiation Ievel is None, return "x is ideal" where x is the name of the planet.
Otherwise return "x is habitable, but not ideal" where x is the name of the planet