Question: This question is about choosing the most appropriate pattern to solve a problem. ( Note that the resources page of the module site includes a

This question is about choosing the most appropriate pattern to solve a problem. (Note that the resources page of the module site includes a Problem solving and Python quick reference with descriptions of all the patterns.)
You should read through the following scenario and choose the most appropriate pattern to use.
The magnitude of earthquakes is often measured using the numeric Richter scale, which can be described as follows in a simplified manner:
Magnitude
Description
below 4
minor
4 or more, but less than 6
moderate
6 or more, but less than 7
strong
7 or more, but less than 8
major
8 or more
great
You want to design and write a program that given the Richter magnitude (a positive floating-point number) as the input, prints a message as shown below.
Input
Result
1
That is a minor earthquake.
3.9
That is a minor earthquake.
4
That is a moderate earthquake.
6
That is a strong earthquake.
Question 19Select one:
a.
Pattern 2.8 Find Best
b.
Pattern 4.2 Case analysis (two cases)
c.
Pattern 4.3 Analyse (multiple Cases)
d.
Pattern 4.4 Case analysis (nested cases)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!