Question: This is a Basic linux script Name the script weather.sh. Your code should work for any combination of upper and lowercase letters that the user
This is a Basic linux script
- Name the script weather.sh.
- Your code should work for any combination of upper and lowercase letters that the user enters for any of the input. For example, yes, Yes, YeS, yES, YES, YEs, etc should all work for any input.
- Ask the user if you can ask them a question.
- If they answer no, print an appropriate message and exit.
- If they answer yes or Yes, ask "How's the weather?"
- If they answer rainy print "It is good for the crops."
- If they answer cold print "Get your jacket."
- If they answer hot print "Good day for the beach."
- If they answer perfect print "Ahhh, perfection."
- If they answer anything else print a message that includes the answer they gave. For example, if they enter thunderstorms it could print "thunderstorms, eh? That's fascinating."
- If they do not answer yes or no for the first question, keep asking until they do answer yes or no.
- Any input is fine for the second question, but it cannot be blank.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
