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
Lunna [17]
3 years ago
10

Question Set 22.1 Using the count method, find the number of occurrences of the character 's' in the string 'mississippi'.2.2 In

the string 'mississippi', replace all occurrences of the substring 'iss' with 'ox'.2.3 Find the index of the first occurrence of 'p' in 'mississippi'.
Engineering
1 answer:
Gnom [1K]3 years ago
8 0

Answer:

# Program is written in python

# 22.1 Using the count method, find the number of occurrences of the character 's' in the string 'mississippi'.

# initializing string

Stringtocheck = "mississippi"

# using count() to get count of s

counter = Stringtocheck.count('s')

# printing result

print ("Count of s is : " + str(counter))

# 2.2 In the string 'mississippi', replace all occurrences of the substring 'iss' with 'ox

# Here, we'll make use of replace() method

# Prints the string by replacing iss by ox

print(Stringtocheck.replace("iss", "ox"))

#2.3 Find the index of the first occurrence of 'p' in 'mississippi'

# declare substring

substring = 'p'

# Find index

index = Stringtocheck.find(substring)

# Print index

print(index)

# End of program

You might be interested in
How did Atlantis benefit from lessons learned in construction of earlier orbiters?
Alenkasestr [34]

Answer:

Atlantis benefited from lessons learned in the construction and testing of Enterprise, Columbia and Challenger. ... The Experience gained during the Orbiter assembly process also enabled Atlantis to be completed with a 49.5 percent reduction in man hours (compared to Columbia).

Explanation:

8 0
3 years ago
The amplitudes of the displacement and acceleration of an unbalanced motor were measured to be 0.15 mm and 0.6*g, respectively.
ehidna [41]

Answer:

The speed of shaft is 1891.62 RPM.

Explanation:

given that

Amplitude A= 0.15 mm

Acceleration = 0.6 g

So

we can say that acceleration= 0.6 x 9.81

acceleration,a=5.88\ \frac{m}{s^2}

We know that

a=\omega ^2A

So now by putting the values

a=\omega ^2A

5.88=\omega ^2 \0.15\times 10^{-3}

\omega =198.09\ \frac{rad}{s}

We know that

  ω= 2πN/60

198.0=2πN/60

N=1891.62 RPM

So the speed of shaft is 1891.62 RPM.

                                               

       

4 0
3 years ago
What is the magnetic force on a moving electric charge called
crimeas [40]
The magnetic force on a free moving charge is perpendicular to both the velocity of the charge and the magnetic field with direction given by the right hand rule. The force is given by the charge times the vector product of velocity and magnetic field.
4 0
3 years ago
Read 2 more answers
How does emotion affect a persons driving
Elodia [21]

Answer:

if ur mad you may drive faster if ur sad u may drive slower due to the amount of adrenaline and dopamine levels in your body in that given moment

Explanation:

4 0
3 years ago
Two different fuels are being considered for a 2.5 MW (net output) heat engine which can operate between the highest temperature
sveta [45]

Answer:

If the heat engine operates for one hour:

a) the fuel cost at Carnot efficiency for fuel 1 is $409.09 while fuel 2 is $421.88.

b) the fuel cost at 40% of Carnot efficiency for fuel 1 is $1022.73 while fuel 2 is $1054.68.

In both cases the total cost of using fuel 1 is minor, therefore it is recommended to use this fuel over fuel 2. The final observation is that fuel 1 is cheaper.

Explanation:

The Carnot efficiency is obtained as:

\epsilon_{car}=1-\frac{T_c}{T_H}

Where T_c is the atmospheric temperature and T_H is the maximum burn temperature.

For the case (B), the efficiency we will use is:

\epsilon_{b}=0.4\epsilon_{car}

The work done by the engine can be calculated as:

W=\epsilon Q=\epsilon H_v\cdot m_{fuel} where Hv is the heat value.

If the average net power of the engine is work over time, considering a net power of 2.5MW for 1 hour (3600s), we can calculate the mass of fuel used in each case.

m=\frac{P\cdot t}{\epsilon H_v}

If we want to calculate the total fuel cost, we only have to multiply the fuel mass with the cost per kilogram.

TC=m\cdot c

8 0
3 years ago
Other questions:
  • LUNES MARTES MIÉRCOLES JUEVES VIERNES SÁBADO DOMINGO
    10·1 answer
  • In Visual Basic/Visual Studio, characteristics of controls, such as the Name of the control, or the Text displayed on the contro
    10·1 answer
  • A solid steel shaft has to transmit 100 kW at 160 RPM. Taking allowable shear stress at 70 Mpa, find the suitable diameter of th
    15·1 answer
  • The jib crane is supported by a pin at Cand rod AB. The rod can withstand a maximum tension of 40 kN. If the load has a mass of
    11·1 answer
  • For a very rough pipe wall the friction factor is constant at high Reynolds numbers. For a length L1 the pressure drop over the
    9·1 answer
  • How do engineering and technology impact the natural world and environment
    6·1 answer
  • For an AC machine, what percentage of power is at the negative terminal?
    14·1 answer
  • Factors such as brake shoe orientation, pin location, and direction of rotation determine whether a particular brake shoe is con
    12·1 answer
  • How do you get your drivers lisnes when your 15
    8·1 answer
  • 'Energy' has the potential to:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!