1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
irina1246 [14]
3 years ago
10

The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,

which is no wind, up to 12, which is a hurricane. Write a script that generates a random force value between 0 and 12, with use of randi command, Then, it prints a message regarding what type of wind that force represents. The answers should follow this pattern:
Computers and Technology
1 answer:
yaroslaw [1]3 years ago
8 0

Answer:

See explaination

Explanation:

Script by switch statement

random_force = randi(12) switch(random_force) case 0 disp("There is no wind") case {1,2,3,4,5,6} disp("there is a breeze") case {7,8,9} disp("there is a gale") case {10,11} disp("it is a storm") case 12 disp("Hello Hurricane!") end

First it generates a random force between 1 and 12

Then the switch statement is executed according to the force

in case values of corresponding force are written and their string will be printed according to the case which depends upon the value of random_force

Multiple case values are used because we need multiple values to print the same string

So values {1,2,3,4,5,6} , {7,8,9},{10,11} are combined into one case becuse they all have same value

Script by using nested if-else

random_force = randi(12) //It will genrate a random force value between 1 and 12 which can be used further if random_force == 0 disp("There is no wind") elseif (random_force > 0) && (random_force < 7) disp("there is a breeze") elseif (random_force > 6) && (random_force < 10) disp("there is a gale") elseif (random_force > 9) && (random_force < 12) disp("it is a storm") elseif random_force == 12 disp("Hello Hurricane!") end

First if will check if force is zero and will print its corresponding string

Second,elseif will check if force is between 1 and 6 and will print its corresponding string

third elseif will check if force is between 7 and 9 and will print its corresponding string

Fourth elseif will check if force is 10 or 11 and will print its corresponding string

Last else if will compare value to 12 and return the corresponding string

You might be interested in
Def rectangle_area(base,height):
user100 [1]

Using the computer language in python to write a function code that calculates the area of ​​a rectangle.

<h3>Writting the code in python:</h3>

<em>def rectangle_area(base, height):</em>

<em> z = base*height  # the area is base*height</em>

<em> print("The area is " + str(z))</em>

<em>rectangle_area(5,6)</em>

See more about python at brainly.com/question/18502436

#SPJ1

6 0
2 years ago
Ethics issues are significant in the area of online privacy because laws have not kept pace with the growth of the Internet and
raketka [301]

Answer:

The answer is "True"

Explanation:

In the given statement some information is missing that is "True or false"

Internet security is the scope of the privacy and security of the electronic exchange of data. It's a common term that refers to something like many factors, technologies, and technology used to protect records, contact, and interests, confidential and private.

  • The security of the Internet is recognized as the privacy of the User.
  • It is secure and unique passphrases or two-factor authentication.
7 0
3 years ago
A _____ cloud allows an organization to take advantage of the scalability and cost-effectiveness that a public cloud computing e
balu736 [363]

Answer:

Hybrid

Explanation:

Hybrid cloud is a solution that combines a private cloud with one or more public cloud services, with proprietary software enabling communication between each distinct service.

5 0
4 years ago
Major findings of evolution of computers
Elis [28]

Answer:

twitt

Explanation:

3 0
3 years ago
A Windows user contacted the help desk with a problem that requires the technician to connect to the remote computer using Remot
djverab [1.8K]

Answer:

RDP port 3389 .

Explanation:

A Windows user has informed the helpdesk with such an issue that requires the operator to link to the remote server through Remote Assistance to access the user's screen with a very comprehensive and ambiguous error message. Almost any attempt made by the operator to link to the remote access concludes in a message that says that the connection has been denied. To make this link, the following protocol and the port number combinations must be enabled on the firewall of the remote connection.

6 0
3 years ago
Other questions:
  • What does a graphic organizer do
    6·1 answer
  • What names of websites of presentation or visualization <br>​
    15·1 answer
  • Which would increase electric current? increasing the resistance increasing the size of the wire decreasing the voltage
    6·1 answer
  • Which of the following actions is an example of "window dressing?" a. Using some of the firm’s cash to reduce long-term debt. b.
    13·1 answer
  • The _______ of a secondary storage device indicates how much data the storage medium can hold.
    13·1 answer
  • Is a psychrometer more likely used at a beach or a desert in California
    12·1 answer
  • Point out the correct statement.
    11·1 answer
  • what term defines inventiveness uncertainty and futuristic ideas typically deals with science and technology
    15·1 answer
  • Consider the following code segment
    15·1 answer
  • Select the correct answers
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!