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
Why is my lawn mower not starting?
EleoNora [17]

Answer:

Other possible causes include: Loose, Dirty or Disconnected Spark Plug in Your Lawn Mower: Check it out, clean off debris, re-connect and tighten. Dirty Air Filter: Clean or replace. Fuel Not Reaching the Engine: Tap the side of the carburetor to help the flow of gas.

6 0
3 years ago
Why not just put all the set up steps within each step? it is because we want to keep our code __ ? (3 letters)
andrezito [222]

Why not simply include each step's setup instructions within it? is it due to our desire to maintain DRY (Don't Repeat Yourself) code?

<h3>What is the purpose of unit testing?</h3>

Program testing is known as "unit testing" involves testing individual software components. When developing an application, unit testing is done on the software product. An individual component could be a technique or a specific function.

Unit testing's primary goal is to separate written code for testing to see if it functions as intended. Unit testing is a crucial stage in the development process because, when done properly, it can aid in finding early code issues that could be more challenging to identify in subsequent testing phases.

The core of the testing process consists of unit testing and functional testing. The primary distinction between the two is that during the development cycle, the developer conducts unit testing. The tester does functional testing at the system testing level.

To learn more about unit testing refers to:

brainly.com/question/22900395

#SPJ4

8 0
1 year ago
A 10-mm steel drill rod was heat-treated and ground. The measured hardness was found to be 290 Brinell. Estimate the endurance s
grandymaker [24]

Answer:

the endurance strength  S_e = 421.24  MPa

Explanation:

From the given information; The objective is to estimate the endurance strength, Se, in MPa .

To do that; let's for see the expression that shows the relationship between the ultimate tensile strength and Brinell hardness number .

It is expressed as:

200 \leq H_B \leq 450

S_{ut} = 3.41 H_B

where;

H_B = Brinell hardness number

S_{ut} =  Ultimate tensile strength

From ;

S_{ut} = 3.41 H_B; replace 290 for H_B ; we have

S_{ut} = 3.41 (290)

S_{ut} = 988.9 MPa

We can see that the derived value for the ultimate tensile strength when the Brinell harness number = 290 is less than 1400 MPa ( i.e it is 988.9 MPa)

So; we can say

S_{ut} < 1400

The Endurance limit can be represented by the formula:

S_e ' = 0.5 S_{ut}

S_e ' = 0.5 (988.9)

S_e ' = 494.45 MPa

Using Table 6.2 for parameter for Marin Surface modification factor. The value for a and b are derived; which are :

a = 1.58

b =  -0.085

The value of the surface factor can be calculate by using the equation

k_a = aS^b_{ut}

K_a = 1.58 (988.9)^{-0.085

K_a = 0.8792

The formula that is used to determine the value of  k_b for the rotating shaft of size factor d = 10 mm is as follows:

k_b = 1.24d^{-0.107}

k_b = 1.24(10)^{-0.107}

k_b = 0.969

Finally; the the endurance strength, Se, in MPa if the rod is used in rotating bending is determined by using the expression;

S_e =k_ak_b S' _e

S_e= 0.8792×0.969×494.45

S_e = 421.24  MPa

Thus; the endurance strength  S_e = 421.24  MPa

8 0
3 years ago
Technician A says if the input signal turn-on time is too fast for the input circuit, your program may operate as though the inp
ASHA 777 [7]

Answer:

b. Technician B only

Explanation:

A watchdog timer is a circuit that automatically monitors the MCU (Microcontroller Unit) for any anomaly, detects it and helps the MCU to recover from the malfunction it has detected.

If the input signal turn-on time is too fast for the input circuit, that is a malfunction and this activates the watchdog timer circuit to correct this malfunction immediately. So Technician B only is correct as the watchdog timer is activated immediately once there is a malfunction.

7 0
3 years ago
A cylindrical drill with radius 4 is used to bore a hole through the center of a sphere of radius 5. Find the volume of the ring
ANTONII [103]

Answer:

The volume of the ring shaped solid that remains is 21 unit^3.

Explanation:

The total volume of the sphere is given as:

Volume of Sphere = (4/3)πr^3

where, r = radius of sphere

Volume of Sphere = (4/3)(π)(5)^3

Volume of Sphere = 523.6 unit^3

Now, we find the volume of sphere removed by the drill:

Volume removed = (Cross-sectional Area of drill)(Diameter of Sphere)

Volume removed = (πr²)(D)

where, r = radius of drill = 4

D = diameter of sphere = 2*5 = 10

Therefore,

Volume removed = (π)(4)²(10)

Volume removed = 502.6 unit^3

Therefore, the volume of ring shaped solid that remains will be the difference between the total volume of sphere, and the volume removed.

Volume of Ring = Volume of Sphere - Volume removed

Volume of Ring = 523.6 - 502.6

<u>Volume of Ring = 21 unit^3</u>

5 0
3 years ago
Other questions:
  • Compare automation and autonomous
    12·1 answer
  • In many problems where the potential energy is considered between two objects, the potential energy is defined as zero when the
    8·1 answer
  • Part of the following pseudocode is incompatible with the Java, Python, C, and C++ language Identify the problem. How would you
    12·1 answer
  • When testing a compressor with an ohm meter, a technician read 2 ohms between the start terminal and the case of the compressor.
    5·1 answer
  • The<br> _______includes classes of laborers, such as general laborer, apprentice laborer and mason.
    9·1 answer
  • Has anyone lost faith in humanity ✌️
    7·1 answer
  • Which design activity is part of the design for manufacturability (DFM) methodology?
    10·1 answer
  • Please help ill mark as brainlest
    13·1 answer
  • : A drive system using the electric motor is under load as 75Nm with an angular velocity of 100rad/s, then the electric motor is
    11·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!