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
minor
or more, but less than
moderate
or more, but less than
strong
or more, but less than
major
or more
great
You want to design and write a program that given the Richter magnitude a positive floatingpoint number as the input, prints a message as shown below.
Input
Result
That is a minor earthquake.
That is a minor earthquake.
That is a moderate earthquake.
That is a strong earthquake.
Question Select one:
a
Pattern Find Best
b
Pattern Case analysis two cases
c
Pattern Analyse multiple Cases
d
Pattern Case analysis nested cases
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
