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
nordsb [41]
1 year ago
3

How can I create this code this in Python?

Engineering
1 answer:
Marat540 [252]1 year ago
7 0

The program in Phyton that meets the above requirements is:

# import the random module

import random

# generate a random number between 1 and 10

number = random.randint(1, 10)

# initialize the number of guesses to 0

guesses = 0

# prompt the user for a guess and keep track of the number of guesses

while True:

   guess = int(input('Guess a number between 1 and 10: '))

   guesses += 1

   # if the guess is too low, let the user know

   if guess < number:

       print('Your guess is too low.')

   # if the guess is too high, let the user know

   elif guess > number:

       print('Your guess is too high.')

   # if the guess is correct, let the user know and exit the loop

   else:

       print('You guessed the number in', guesses, 'guesses!')

       break

<h3>What is the explanation?</h3>

This software creates a random number between 1 and 10, prompts the user for a guess, and keeps track of how many guesses are made. If the user's guess is too low, it produces an error message. If the user's guess is too high, it produces an error notice.

If the user successfully guesses the number, it publishes a message informing them of their success and the number of guesses required and then exits the loop.

Learn more about the program:
brainly.com/question/11023419
#SPJ1

You might be interested in
Compare and contrast the roles of agricultural and environmental scientists.
aleksandr82 [10.1K]

Answer:

HUHHHHHH BE SPECIFIC CHILE

Explanation:

ERM IRDK SORRY BOUT THAT

8 0
3 years ago
During an unsteady-flow process, the amount of mass and energy entering a control volume must be equal to the amount of mass and
SSSSS [86.1K]

Answer:

False

Explanation: An unstable flow is a flow process where the properties of the flow is unstable, in this case the flow input and flow output are not equal.

Unstable flow is also known as transient flow process because the main properties of interest which includes the time of flow and the volume of the flow through the pipe is not the same so this type of low gives more concern to the person carrying out the study.

3 0
4 years ago
Read 2 more answers
A simple non-ideal Rankine cycle with water as the working fluid operates between the pressure limits of 15 MPa in the boiler an
konstantin123 [22]

Answer:

The right solution is "28.45%".

Explanation:

The given values are:

P_4=50\ kPa

h_4=0.7(2304.7)+340.5

    =1953.83 \ KJ/Kg

and,

P_3=15 \ mPa

h_3=hg

    =2610.8 \ KJ/Kg

s_3=sg

    =5.3108 \ KJ/Kgh

At 45,

⇒ x_{45} = \frac{5.3108-1.0912}{6.5019}

          =0.66

At P_4=50 \ Kpa,

h_f=340.54

or,

V_f=0.001030 \ m^3/Kg

then,

⇒ h_2=340.54+0.001030(15\times 10^{3}-50)

        =355.94 \ kJ/kg

hence,

The isentropic efficiency of turbine will be:

⇒ n_T=\frac{h_3-h_4}{h_3-h_{45}}

         =\frac{2610.8-1953.83}{2610.8-1836.26}

         =84.818 (%)

The thermal efficiency of cycle will be:

⇒ n_C=\frac{W_T-W_P}{2_{in}}

         =\frac{(2610.8-1953-83)-(355.93-340.54)}{2610.8-355.93}

         =28.45 (%)  

4 0
3 years ago
A(n) BLANK authenticates various specimens in a collection for a museum.
mezya [45]

Answer:

Curators

Explanation:

4 0
3 years ago
Acoke can with inner diameter(di) of 75 mm, and wall thickness (t) of 0.1 mm, has internal pressure (pi) of 150 KPa and is suffe
NemiM [27]

Answer:

All 3 principal stress

1. 56.301mpa

2. 28.07mpa

3. 0mpa

Maximum shear stress = 14.116mpa

Explanation:

di = 75 = 0.075

wall thickness = 0.1 = 0.0001

internal pressure pi = 150 kpa = 150 x 10³

torque t = 100 Nm

finding all values

∂1 = 150x10³x0.075/2x0,0001

= 0.5625 = 56.25mpa

∂2 = 150x10³x75/4x0.1

= 28.12mpa

T = 16x100/(πx75x10³)²

∂1,2 = 1/2[(56.25+28.12) ± √(56.25-28.12)² + 4(1.207)²]

= 1/2[84.37±√791.2969+5.827396]

= 1/2[84.37±28.33]

∂1 = 1/2[84.37+28.33]

= 56.301mpa

∂2 = 1/2[84.37-28.33]

= 28.07mpa

This is a 2 d diagram donut is analyzed in 2 direction.

So ∂3 = 0mpa

∂max = 56.301-28.07/2

= 14.116mpa

6 0
3 years ago
Other questions:
  • The gear with the least number of teeth is called the
    11·1 answer
  • A stress researcher wants to look at the effect of meditation on anxiety. To do this, she creates two groups of subjects: one gr
    13·1 answer
  • Water flows through a pipe of 100 mm at the rate of 0.9 m3 per minute at section A. It tapers to 50mm diameter at B, A being 1.5
    14·1 answer
  • The enthalpy of the water entering an actual pump is 500 kJ/kg and the enthalpy of the water leaving it is 550 kJ/kg. The pump h
    10·1 answer
  • A 30 mm thick AISI 1020 steel plate is sandwiched between two 10 mm thick 2024-T3 aluminum plates and compressed with a bolt and
    9·1 answer
  • How can I use the flux density B formula if I don’t know magnetic flux
    15·1 answer
  • Is there a way to get the answers to a NCCER book test?
    7·1 answer
  • "Carbon 14 (C-14), a radioactive isotope of carbon, has a half-life of 5730 ± 40 years. Measuring the amount of this isotope lef
    12·1 answer
  • LEARNING ACTIVITY SHEET
    12·1 answer
  • What is the tolerance for number 4?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!