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
snow_tiger [21]
3 years ago
8

A certain robot can perform only 4 types of movement. It can move either up or down or left or right. These movements are repres

ented by ’U’, ’D’, ’L’, ’R’. Assume all these movements to be of unit distance. Write a function named theRoundTrip that takes all the movements the robot made in a day as input and output True of bool type if the robot returned to its starting position after its journey. Otherwise, return False. If the input is bad print the message "bad input".
Engineering
1 answer:
Olegator [25]3 years ago
8 0

Answer:

def theRoundTrip(movement):

   x=0

   y=0

   for i in movement:

       if i not in ["U","L","D","R"]:

           print("bad input")

           return

       if i=="U":

           y+=1

       if i=="L":

           x-=1

       if i=="D":

           y-=1

       if i=="R":

           x+=1

   return x==0 and y==0

You might be interested in
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
3 years ago
Direction: List down or enumerate the type of outlets you want to install on your dream house. Also indicate the quantity (in pi
Lorico [155]

Answer:

Apartment outlet 4pcs

Explanation:

6 0
2 years ago
A 1000 W iron utilizes a resistance wire which is 20 inches long and has a diameter of 0.08 inches. Determine the rate of heat g
SSSSS [86.1K]

Answer:

The rate of heat generation in the wire per unit volume is 5.79×10^7 Btu/hrft^3

Heat flux is 9.67×10^7 Btu/hrft^2

Explanation:

Rate of heat generation = 1000 W = 1000/0.29307 = 3412.15 Btu/hr

Area (A) = πD^2/4

Diameter (D) = 0.08 inches = 0.08 in × 3.2808 ft/39.37 in = 0.0067 ft

A = 3.142×0.0067^2/4 = 3.53×10^-5 ft^2

Volume (V) = A × Length

L = 20 inches = 20 in × 3.2808 ft/39.37 in = 1.67 ft

V = 3.53×10^-5 × 1.67 = 5.8951×10^-5 ft^3

Rate of heat generation in the wire per unit volume = 3412.15 Btu/hr ÷ 5.8951×10^-5 ft^3 = 5.79×10^7 Btu/hrft^3

Heat flux = 3412.15 Btu/hr ÷ 3.53×10^-5 ft^2 = 9.67×10^7 Btu/hrft^2

3 0
2 years ago
Air at 26 kPa, 230 K, and 220 rn/s enters a turbojet engine in flight. The air mass flow rate is 25 kg/s. The compressor pressur
Paha777 [63]

Answer:

Explanation:

Answer:

Explanation:

Answer:  

Explanation:  

This is a little lengthy and tricky, but nevertheless i would give a step by step analysis to make this as simple as possible.  

(a). here we are asked to determine the Temperature and Pressure.  

Given that the properties of Air;  

ha = 230.02 KJ/Kg  

Ta = 230 K  

Pra = 0.5477  

From the energy balance equation for a diffuser;  

ha + Va²/2 = h₁ + V₁²/2  

h₁ = ha + Va²/2 (where V₁²/2 = 0)  

h₁ = 230.02 + 220²/2 ˣ 1/10³  

h₁ = 254.22 KJ/Kg  

⇒ now we obtain the properties of air at h₁ = 254.22 KJ/Kg  

from this we have;  

Pr₁ = 0.7329 + (0.8405 - 0.7329)[(254.22 - 250.05) / (260.09 - 250.05)]  

Pr₁ = 0.77759  

therefore T₁ = 254.15K  

P₁ = (Pr₁/Pra)Pa  

= 0.77759/0.5477 ˣ 26  

P₁ = 36.91 kPa  

now we calculate Pr₂  

Pr₂ = Pr₁ (P₂/P₁) = 0.77759 ˣ 11 = 8.55349  

⇒ now we obtain properties of air at  

Pr₂ = 8.55349 and h₂ = 505.387 KJ/Kg  

calculating the enthalpy of air at state 2  

ηc = h₁ - h₂ / h₁ - h₂  

0.85 = 254.22 - 505.387 / 254.22 - h₂  

h₂ = 549.71 KJ/Kg  

to obtain the properties of air at h₂ = 549.71 KJ/Kg  

T₂ = 545.15 K

⇒ to calculate the pressure of air at state 2

P₂/P₁ = 11

P₂ = 11 ˣ 36.913  

p₂ = 406.043 kPa

but pressure of air at state 3 is the same,

i.e. P₂ = P₃ = 406.043 kPa

P₃ = 406.043 kPa

To obtain the properties of air at  

T₃ = 1400 K, h₃ = 1515.42 kJ/Kg and Pr = 450.5

for cases of turbojet engine,

we have that work output from turbine = work input to the compressor

Wt = Wr

(h₃ - h₄) = (h₂ - h₁)

h₄ = h₃ - h₂ + h₁  

= 1515.42 - 549.71 + 254.22

h₄ = 1219.93 kJ/Kg

properties of air at h₄ = 1219.93 kJ/Kg

T₄ = 1140 + (1160 - 1140) [(1219.93 - 1207.57) / (1230.92 - 1207.57)]

T₄ = 1150.58 K

Pr₄ = 193.1 + (207.2 - 193.1) [(1219.93 - 1207.57) / (1230.92 - 1207.57)]

Pr₄ = 200.5636

Calculating the ideal enthalpy of the air at state 4;

Лr = h₃ - h₄ / h₃ - h₄*

0.9 = 1515.42 - 1219.93 / 1515.42 - h₄  

h₄* = 1187.09 kJ/Kg

now to obtain the properties of air at h₄⁻ = 1187.09 kJ/Kg

P₄* = 179.7 + (193.1 - 179.7) [(1187.09 -1184.28) / (1207.57 - 1184.28)]

P₄* = 181.316

P₄ = (Pr₄/Pr₃)P₃       i.e. 3-4 isentropic process

P₄ = 181.316/450.5 * 406.043

P₄ = 163.42 kPa

For the 4-5 process;

Pr₅ = (P₅/P₄)Pr₄

Pr₅ = 26/163.42 * 200.56 = 31.9095

to obtain the properties of air at Pr₅ = 31.9095

h₅= 724.04 + (734.82 - 724.04) [(31.9095 - 3038) / (32.02 - 30.38)]

h₅ = 734.09 KJ/Kg

T₅ = 710 + (720 - 710) [(31.9095 - 3038) / (32.02 - 30.38)]

T₅ = 719.32 K

(b) Now we are asked to calculate the rate of heat addition to the air passing through the combustor;

QH = m(h₃-h₂)

QH = 25(1515.42 - 549.71)

QH = 24142.75 kW

(c). To calculate the velocity at the nozzle exit;

we apply steady energy equation of a flow to nozzle

h₄ + V₄²/2 = h₅ + V₅²/2

h₄  + 0  = h₅₅ + V₅²/2

1219.9 ˣ 10³ = 734.09 ˣ 10³ + V₅²/2

therefore, V₅ = 985.74 m/s

cheers i hope this helps

6 0
3 years ago
Reduce the force F ij = + (2 5 ) kN to point A(2m,3m) that acts on point B( 3m,5m) - .
Alexxx [7]

Given :

Force, \vec{F}= (2\hat{i} + 5\hat{j})\ kN.

Force is acting at point A( 2 m, 3 m ) and B( 3 m, 5 m )

To Find :

The work done by force F .

Solution :

Displacement vector between point A and B is :

\vec{d} = (3-2)\hat{i} + (5-3)\hat{j}\\\\\vec{d} = \hat{i} + 2\hat{j}

Now, we know work done is given by :

W = \vec{F}.\vec{d}\\\\W= (2\hat{i} + 5\hat{j}).(\hat{i}+\hat{2j})\\\\W = (2\times 1) +( 5\times 2) \ kJ\\\\W = 12 \ kJ

W = 12000 J

Therefore, work done by force is 12000 J .

6 0
2 years ago
Other questions:
  • 5. Switch a in the circuit has been open for a long time and switch b has been closed for a long time. Switch a is closed at t =
    13·1 answer
  • An aluminium alloy bar of diameter 12.5 mm and length 27 m loaded in uniaxial tension to a force of 3 kN. Determine the length o
    15·1 answer
  • The electricity generated by wind turbines annually in kilowatt-hours per year is given in a file. The amount of electricity is
    5·2 answers
  • The ventilating fan of the bathroom of a building has a volume flow rate of 32 L/s and runs continuously. If the density of air
    7·1 answer
  • MCQ : What are the main the constituents of acid rains?
    10·2 answers
  • An engineer is trying to build a new measurement tool. Which step should the engineer complete first? A. Design a model of the t
    8·1 answer
  • Your friend has two substances A and B which are compressed liquid and superheated vapor respectively. Both are in rigid vessels
    15·1 answer
  • Define Ancestor, Descendant, Siblings, Height, Depth, Root and Leaf for the
    9·1 answer
  • Engineered lumber should not be used for
    15·1 answer
  • A company intends to market a new product and it estimates that there is a 20% chance that it will be first in the market
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!