Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started