Answered step by step
Verified Expert Solution
Link Copied!

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

  1. Name the script weather.sh.
  2. 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.
  3. Ask the user if you can ask them a question.
  4. If they answer no, print an appropriate message and exit.
  5. 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."
  6. If they do not answer yes or no for the first question, keep asking until they do answer yes or no.
  7. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago