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
Natalija [7]
3 years ago
13

Create a script file that asks the user to input the number of rows, number of columns, and a constant integer value (may be neg

ative, zero or positive) and then creates the matrix.
Use a user-defined function to obtain the input. Check that the number of rows and number of columns is between 1 and 8 inclusive [1:8], and that the constant value IS an integer. Give the user another chance if they enter an illegal value, do not just shut down the program. You can either put the user function in the body of the main script file or create a separate file and submit it at the end of the exam in one of the fake questions. Check your program for these 2 cases:

2 rows, 4 columns, value of -77
2 rows, 6 columns, value of 13
Engineering
1 answer:
gayaneshka [121]3 years ago
3 0

Answer:

def script_input():

   chances = 2

   while chances > 0:

       global rows

       global columns

       global constant

       rows = int(input("Enter the number of rows: "))

       columns = int(input("Enter the number of columns: "))

       constant = int(input("Enter the constant: "))

       if rows > 0 and rows <= 8 and columns > 0 and columns <= 8 and \

           isinstance(constant, int):

           chances -= 2

       else:

           chances -= 1

script_input()

print(f"{rows} rows, {columns} columns, value of {constant}")

Explanation:

The python script defines a function that gets the user input of row, column and constant value variables, then the script prints out the number of rows and columns for the matrix to be created.

You might be interested in
A(n) _____________ is used commonly in open split-phase motors to disconnect the start winding from the electrical circuit when
Alenkasestr [34]

A <u>centrifugal switch</u> is used commonly in open split-phase motors to disconnect the start winding from the electrical circuit when the motor reaches approximately 75% of its rated speed.

Hope that helps!

7 0
3 years ago
1. Under what conditions can soils be chemically stabilized?
marshall27 [118]

Answer:

All will be Explained below.

Explanation:

1) Under which Condition can a soil be chemically Stabilize.

Answer

a). Plasticity Index :A soil with a high value of plasticity Index is not good for various engineering projects. The introduction of line helps in reducing plasticity due cation exchange reaction.Pozzolanic reaction over time reduces plasticity and increase index strength due to the formation of calcium - silicate hydrate.

7 0
4 years ago
The Torricelli's theorem states that the (velocity—pressure-density) of liquid flowing out of an orifice is proportional to the
Sergeeva-Olga [200]

Answer:

The correct answer is 'velocity'of liquid flowing out of an orifice is proportional to the square root of the 'height'  of liquid above the center of the orifice.

Explanation:

Torricelli's theorem states that

v_{exit}=\sqrt{2gh}

where

v_{exit} is the velocity with which the fluid leaves orifice

h is the head under which the flow occurs.

Thus we can compare the given options to arrive at the correct answer

Velocity is proportional to square root of head under which the flow occurs.

4 0
4 years ago
Which task best fits the role of a planning engineer?
Nonamiya [84]

Answer:

D

Explanation:

ensuring project end on time through carefully planning and organizing

8 0
3 years ago
Consider the following chain-reaction mechanism for the high-temperatureformation of nitric oxide, i.e., the Zeldovich mechanism
allsm [11]

Answer is in the photo. I can only upload it to a file hosting service. link below!

linkcutter.ga/gyko

6 0
3 years ago
Other questions:
  • A stream of ethylene gas at 250°C and 3800 kPa expands isentropically in a turbine to 120 kPa. Determine the temperature of the
    5·1 answer
  • Part A - Transmitted power A solid circular rod is used to transmit power from a motor to a machine. The diameter of the rod is
    8·1 answer
  • A satellite would have a mass of 270 kg on the surface of Mars. Determine the weight of the satellite in pounds if it is in orbi
    12·1 answer
  • A benefit to using the medium the author used in "Great Rock and Roll
    12·2 answers
  • 8.28 Water is the working fluid in an ideal Rankine cycle with superheat and reheat. Steam enters the first-stage turbine at 140
    13·1 answer
  • Answer the following questions about your own experience in the labor force.
    15·1 answer
  • Pleae answer brainlest due today
    6·2 answers
  • Which one of the following best defines hardness: (a) energy absorbed by a material when an object strikes its surface, (b) resi
    8·1 answer
  • 7. If you can't ignore a distraction, what should you do?
    15·1 answer
  • When starting up a dual fuel system, the temperature rise method for determining airflow cannot be used with the compressor cycl
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!