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
Genrish500 [490]
3 years ago
15

Write a function to find the factors of an input number. The function should have one input n and a single output of a vector wh

ose entries are the factors of n. The only built in functions you are allowed to use are mod or rem (I would prefer mod). Demonstrate that your function works as expected.
Engineering
1 answer:
Hoochie [10]3 years ago
6 0

The following is the program.                                                          

<u>Explanation</u>:

  • We should  find the factors of input number
  • We can use  python to find the factors of input number
  • In this program, we can use the mod function.

def print_factors(y):

   print("The factors of",y,"are:")

     for j in range(1, y + 1):

          if y % j == 0:

                print(j)

num = 320

print_factors(num)

The above program calculates the factors of n. Here def is called as define function. We are calculating the factors of y. After that, we are giving them for the condition. If the condition is true it will print the factors of y.

                                   

You might be interested in
What is the best countermeasure against social engineering?
Mkey [24]

Answer:

Hello Monk7294!

Answer:

Employee education

Explanation:

The most important countermeasure for social engineering is employee education. All the employees should be trained to keep confidential data safe. As a part of security education, organizations have to provide timely orientation about their security policy to new employees. The security policy should address the consequences of the breaches.

<em>- I Hope this helps Have an awesome day!</em>

<em>~ Chloe marcus <3</em>

3 0
2 years ago
An ideal gas initially at 300 K and 1 bar undergoes a three-step mechanically reversible cycle in a closed system. In step 12, p
Veseljchak [2.6K]

Answer:

Ts =Ta E)- 300(

569.5 K

5

Q12-W12 = -4014.26

Mol

AU2s = Q23= 5601.55

Mol

AUs¡ = Ws¡ = -5601.55

Explanation:

A clear details for the question is also attached.

(b) The P,V and T for state 1,2 and 3

P =1 bar Ti = 300 K and Vi from ideal gas Vi=

10

24.9x10 m

=

P-5 bar

Due to step 12 is isothermal: T1 = T2= 300 K and

VVi24.9 x 10x-4.9 x 10-3 *

The values at 3 calclated by Uing step 3l Adiabatic process

B-P ()

Since step 23 is Isochoric: Va =Vs= 4.99 m* and 7=

14

Ps-1x(4.99 x 103

P-1x(29x 10)

9.49 barr

And Ts =Ta E)- 300(

569.5 K

5

(c) For step 12: Isothermal, Since AT = 0 then AH12 = AU12 = 0 and

Work done for Isotermal process define as

8.314 x 300 In =4014.26

Wi2= RTi ln

mol

And fromn first law of thermodynamic

AU12= W12 +Q12

Q12-W12 = -4014.26

Mol

F'or step 23 Isochoric: AV = 0 Since volume change is zero W23= 0 and

Alls = Cp(L3-12)=5 x 8.311 (569.5 - 300) = 7812.18-

AU23= C (13-72) =5 x 8.314 (569.3 - 300) = 5601.53

Inol

Now from first law of thermodynamic the Q23

AU2s = Q23= 5601.55

Mol

For step 3-1 Adiabatic: Since in this process no heat transfer occur Q31= 0

and

AH

C,(T -Ts)=x 8.314 (300- 569.5)= -7842.18

mol

AU=C, (T¡-T)= x 8.314 (300

-5601.55

569.5)

mol

Now from first law of thermodynamie the Ws1

J

mol

AUs¡ = Ws¡ = -5601.55

3 0
3 years ago
What should you release to re-establish vehicle control and tire traction?
MrMuchimi

Answer: The accelerator and the brakes.

6 0
2 years ago
Q5
Klio2033 [76]

The C++ code that would draw all the iterations in the selection sort process on the array is given below:

<h3>C++ Code</h3>

#include <stdio.h>

#include <stdlib.h>

int main() {

   int i, temp1, temp2;

   int string2[16] = { 0, 4, 2, 5, 1, 5, 6, 2, 6, 89, 21, 32, 31, 5, 32, 12 };

   _Bool check = 1;

   while (check) {

       temp1 = string2[i];

       temp2 = string2[i + 1];

       if (temp1 < temp2) {

           string2[i + 1] = temp1;

           string2[i] = temp2;

           i = 0;

       } else {

           i++;

           if (i = 15) {

               check = !check;

           }

       }

   }

   

   return 0;

}

Read more about C++ programming here:

brainly.com/question/20339175

#SPJ1

5 0
1 year ago
If a 2 1/8 inch diameter medium carbon steel rod is to be turned between centers to a 2 inch diameter using high speed cutting b
Crank

Answer:

I think 1 31/32

8 0
3 years ago
Other questions:
  • For a heat pump, COP&lt;1. a) True b) False
    11·1 answer
  • Two technicians are discussing the intake air temperature (IAT) sensor. Technician A says that the computer uses the IAT sensor
    9·1 answer
  • The amplitudes of the displacement and acceleration of an unbalanced motor were measured to be 0.15 mm and 0.6*g, respectively.
    12·1 answer
  • For a bronze alloy, the stress at which plastic deformation begins is 266 MPa and the modulus of elasticity is105 GPa.
    15·1 answer
  • What are the mechanical properties of a geotextile that are of most importance when using it as a separator in an unpaved road s
    12·1 answer
  • Suppose you have two arrays: Arr1 and Arr2. Arr1 will be sorted values. For each element v in Arr2, you need to write a pseudo c
    11·1 answer
  • An engine has been diagnosed with blowby.
    12·1 answer
  • 6
    10·2 answers
  • PLS HELP! which statement is the best example of how society affects the useof technology? A. Farmers in hilly areas grow crops
    10·1 answer
  • What is the mode of operation of a ramp digital voltimeter​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!