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
Which traits are common in all four career pathways of the Information Technology field? Check all that apply.
Komok [63]

Answer:

Accuracy and attention to detail, Problem solving and critical thinking skills, Knowledge of programming language .

Explanation:

It is a technological area in which a person learns how to develop computer hardware, including PCs, laptops, tablets, processing, networking, and other hardware parts. Another field of study in IT is Management Information Systems (MIS).

The IT industry's career paths can be categorized equally in the two primary field’s hardware and software areas  

In hardware, there is Production, maintenance, research and development, and strategic planning.

In software, there is manufacturing, development, programming, software testing, and maintenance and support under software.  

Computer operations, administration of databases, sales / marketing and data centre management are connected areas.

7 0
2 years ago
Describe the cycle that purifies drinking water. 40 points
Sunny_sXe [5.5K]
Umm the Water cycle sorry I’m trying
5 0
3 years ago
Read 2 more answers
Which of following are coding languages used in controlling a robot? *
Bess [88]

Answer:

C/C++

Explanation:

C/C++

7 0
2 years ago
Integer to Float Conversion All labs must be done during lab time. Each labs worth 10 points The lab can be hand in next day wit
andrew-mc [135]

Answer:

Code explained below

Explanation:

.data

msg1: .asciiz "Please input a temperature in celsius: "

msg2: .asciiz "The temperature in Fahrenheit is: => "

num: .float 0.0

.text

main:

#print the msg1

li $v0, 4

la $a0, msg1

syscall

#read the float value from user

li $v0,6 #read float syscall value is $v0

syscall #read value stored in $f0

#formula for celsius to fahrenheit is

#(temperature(C)* 9/5)+32

#li.s means load immediate float

#copy value 9.0 to $f2

li.s $f2,9.0  

#copy value 5.0 to $f3

li.s $f3,5.0

# following instructions performs: 9/5

#div.s - division of two float numbers

#divide $f2 and f3.Result will stores in $f1

div.s $f1,$f2,$f3

#following instruction performs: temperature(C) * (9/5)

#multiple $f1 and $f0.Result stored in $f1

mul.s $f1,$f1,$f0

#copy value 32 to $f4

li.s $f4,32.0

#following instruction performs: (temperature(C) * (9/5))+32

#add $f1 and $f4.Result stores in $f1

add.s $f1,$f1,$f4

#store float from $f1 to num

s.s $f1,num

#print the msg2

li $v0, 4 #print string syscall value is 4

la $a0, msg2 #copy address of msg2 to $a0

#print the float

syscall

li $v0,2 #print float syscall value is 2

l.s $f12,num #load value in num to $f12

syscall

#terminate the program

li $v0, 10 #terminate the program syscall value is 10

syscall

4 0
3 years ago
A person holds her hand out of an open car window while the car drives through still air at 65 mph. Under standard atmospheric c
Paraphin [41]

Answer:

10.8\ \text{lb/ft^2}

101.96\ \text{lb/ft}^2

Explanation:

v_1 = Velocity of car = 65 mph = 65\times \dfrac{5280}{3600}=95.33\ \text{ft/s}

\rho = Density of air = 0.00237\ \text{slug/ft}^3

v_2=0

P_1=0

h_1=h_2

From Bernoulli's law we have

P_1+\dfrac{1}{2}\rho v_1^2+h_1=P_2+\dfrac{1}{2}\rho v_2^2+h_2\\\Rightarrow P_2=\dfrac{1}{2}\rho v_1^2\\\Rightarrow P_2=\dfrac{1}{2}\times 0.00237\times 95.33^2\\\Rightarrow P_2=10.8\ \text{lb/ft^2}

The maximum pressure on the girl's hand is 10.8\ \text{lb/ft^2}

Now v_1 = 200 mph = 200\times \dfrac{5280}{3600}=293.33\ \text{ft/s}

P_2=\dfrac{1}{2}\rho v_1^2\\\Rightarrow P_2=\dfrac{1}{2}\times 0.00237\times 293.33^2\\\Rightarrow P_2=101.96\ \text{lb/ft}^2

The maximum pressure on the girl's hand is 101.96\ \text{lb/ft}^2

5 0
3 years ago
Other questions:
  • What is shown in the above figure?
    11·2 answers
  • I need solution for this question please<br>Select the right answer ​
    8·2 answers
  • A turbojet aircraft flies with a velocity of 800 ft/s at an altitude where the air is at 10 psia and 20 F. The compressor has a
    8·2 answers
  • The smallest crystal lattice defects is a) cracks b) point defects c) planar defects d) dislocations.
    11·1 answer
  • Using phasors, the value of 37 sin 50t + 30 cos(50t – 45°) is _________ cos(50t+(_____°)). Please report your answer so the magn
    5·1 answer
  • Significant figures are an indicator of accuracy. a) True b) False
    8·1 answer
  • A system samples a sinusoid of frequency 230 Hz at a rate of 175 Hz and writes the sampled signal to its output without further
    9·1 answer
  • Which of the following characteristics would not give animals an advantage in the ocean?
    13·1 answer
  • Technician A says that the starter solenoid switches the high current on and off. Technician B says that the solenoid on the sta
    5·1 answer
  • What are the best collages for architectural learning?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!