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
Sati [7]
4 years ago
7

Write a program that prompts the user to enter two characters and display the corresponding major and year status. The first cha

racter indicates the major. And the second character is a number character 1, 2, 3, 4, which indicates whether a student is a freshman, sophomore, junior, or senior. We consider only the following majors:
B (or b): Biology

C (or c): Computer Science

I (or i): Information Technology and Systems

Note that your program needs to let the user know if the major or year is invalid. Also, your program should be case-insensitive: your program should tell "Biology" either user type ‘b’ or ‘B’.

Engineering
1 answer:
lara31 [8.8K]4 years ago
7 0

Answer:

Following is attached the images for source code and the result according to given question.

I hope it will help you a lot!

Explanation:

You might be interested in
Based on the pattern, what are the next two terms of the sequence? 9,94,916,964,9256,... A. 91024,94096 B. 9260,91028 C. 9260,92
Hatshy [7]

Answer:

The answer is "Option A".

Explanation:

Series:

9, 94, 916, 964, 9256, ........

Solving the above series:

\to  9\\ \to  9(4) =94\\\to 9 (4^2) = 9(16) =916\\\to 9 (4^3) = 9(64) =964\\\to 9 (4^4) = 9(256) =9256\\\to 9 (4^5) = 9(1024) =91024\\\to 9 (4^6) = 9(4096) =94096\\

So, the series is:  9, 94, 916, 964, 9256, 91024, 94096, .................

6 0
3 years ago
Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for-end loop the program exa
ELEN [110]

Answer:

%Program prompts user to input vector

v = input('Enter the input vector: ');

%Program shows the value that user entered

fprintf('The input vector:\n ')

disp(v)

%Loop for checking all array elements

for i = 1 : length(v)

   %check if the element is a positive number

   if v(i) > 0

       %double the element

       v(i) = v(i) * 2;

   %else the element is negative number.

   else

       %triple the element

       v(i) = v(i) * 3;

   end

end

%display the modified vector

fprintf('The modified vector:\n ')

disp(v)

4 0
4 years ago
B1) 20 pts. The thickness of each of the two sheets to be resistance spot welded is 3.5 mm. It is desired to form a weld nugget
kap26 [50]

Answer:

minimum current level required =  8975.95 amperes

Explanation:

Given data:

diameter = 5.5 mm

length = 5.0 mm

T = 0.3

unit melting energy = 9.5 j/mm^3

electrical resistance = 140 micro ohms

thickness of each of the two sheets = 3.5mm

Determine the minimum current level required

first we calculate the volume of the weld nugget

v = \frac{\pi }{4} * D^2 * l = \frac{\pi }{4} * 5.5^2 * 5 = 118.73 mm^3

next calculate the required melting energy

= volume of weld nugget * unit melting energy

= 118.73 * 9.5 = 1127.94 joules

next find the actual required electric energy

= required melting energy / efficiency

= 1127 .94 / ( 1/3 )  = 3383.84 J

TO DETERMINE THE CURRENT LEVEL REQUIRED  use the relation below

electrical energy =  I^2 * R * T

3383.84 / R*T = I^2

3383.84 / (( 140 * 10^-6 ) * 0.3 ) = I^2

therefore  8975.95 = I ( current )

4 0
3 years ago
An engineer measures a sample of 1200 shafts out of a certain shipment. He finds the shafts have an average diameter of 2.45 inc
Vadim26 [7]

Answer: 78.89%

Explanation:

Given : Sample size : n=  1200

Sample mean : \overline{x}=2.45

Standard deviation : \sigma=0.07

We assume that it follows Gaussian distribution (Normal distribution).

Let x be a random variable that represents the shaft diameter.

Using formula, z=\dfrac{x-\mu}{\sigma}, the z-value corresponds to 2.39 will be :-

z=\dfrac{2.39-2.45}{0.07}\approx-0.86

z-value corresponds to 2.60 will be :-

z=\dfrac{2.60-2.45}{0.07}\approx2.14

Using the standard normal table for z, we have

P-value = P(-0.86

=P(z

Hence, the percentage of the diameter of the total shipment of shafts will fall between 2.39 inch and 2.60 inch = 78.89%

7 0
3 years ago
A flywheel made of Grade 30 cast iron (UTS = 217 MPa, UCS = 763 MPa, E = 100 GPa, density = 7100 Kg/m, Poisson's ratio = 0.26) h
hram777 [196]

Answer:

N = 38546.82 rpm

Explanation:

D_{1} = 150 mm

A_{1}= \frac{\pi }{4}\times 150^{2}

              = 17671.45 mm^{2}

D_{2} = 250 mm

A_{2}= \frac{\pi }{4}\times 250^{2}

              = 49087.78 mm^{2}

The centrifugal force acting on the flywheel is fiven by

F = M ( R_{2} - R_{1} ) x w^{2} ------------(1)

Here F = ( -UTS x A_{1} + UCS x A_{2} )

Since density, \rho = \frac{M}{V}

                        \rho = \frac{M}{A\times t}

                        M = \rho \times A\times tM = 7100 \times \frac{\pi }{4}\left ( D_{2}^{2}-D_{1}^{2} \right )\times t

                        M = 7100 \times \frac{\pi }{4}\left ( 250^{2}-150^{2} \right )\times 37

                        M = 8252963901

∴ R_{2} - R_{1} = 50 mm

∴ F = 763\times \frac{\pi }{4}\times 250^{2}-217\times \frac{\pi }{4}\times 150^{2}

  F = 33618968.38 N --------(2)

Now comparing (1) and (2)

33618968.38 = 8252963901\times 50\times \omega ^{2}

∴ ω = 4036.61

We know

\omega = \frac{2\pi N}{60}

4036.61 = \frac{2\pi N}{60}

∴ N = 38546.82 rpm

7 0
3 years ago
Other questions:
  • If a ball is dropped from a height​ (H) its velocity will increase until it hits the ground​ (assuming that aerodynamic drag due
    5·1 answer
  • Which of the following can minimize engine effort in save fuel
    15·2 answers
  • Policy makers in the U.S. government have long tried to write laws that encourage growth in per capita real GDP. These laws typi
    6·1 answer
  • You are an engineer at company XYZ, and you are dealing with the need to determine the maximum load you can apply to a set of bo
    13·1 answer
  • An intranet is a restricted network that relies on Internet technologies to provide an Internet-like environment within the comp
    11·1 answer
  • During a long run a very well-trained dog can use up to 1000 ‘cal’/hour (Note: Food calories differ by a factor of one thousand
    14·1 answer
  • A. Derive linear density expressions for BCC [110] and [111] directions in terms of the atomic radius R.
    7·1 answer
  • A 300-ft long section of a steam pipe with an outside diameter of 4 in passes through an open space at 50oF. The average tempera
    12·1 answer
  • Who wanna learn C# for free tell me​
    10·1 answer
  • PLEASE HELP WITH THIS ASAP! Thanks
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!