subject
Engineering, 16.06.2020 22:57 tonio638

Tip: String. find(searchWord)In this challenge, you will be asked to find one string in the text of another string. Python provides a function to help with this called find() that can be called on any string. To find a string needle in another string haystack, use haystack. find(needle), which will return the position where needle was found, or -1 if it was not found at all. haystack= 'abc def ghi'needle= 'def'needleLocation= haystack. find(needle)print(needneedleLocatio n)print(haystack. find('chicken'))RUN FIND TESTWrite a function isRed() that accepts a string parameter and looks for the presence of the word ‘red’ in the string. If it is found, return boolean True otherwise False. Finally output the result of calling the function with the value in text. CHECK IT!# Get our input from the command lineimport systext= sys. argv[1]# Write your code here

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
question
Engineering, 04.07.2019 18:20
Select any two (2) areas of applications of chain-drive. (clo4) a)-permanent lubrication necessary b)-hydraulic forklift truck operation c)-rigging and heavy moving materials d)-relatively high maintenance costs e)-costlier than belt drives
Answers: 2
question
Engineering, 04.07.2019 18:20
Asolid cylinder is concentric with a straight pipe. the cylinder is 0.5 m long and has an outside diameter of 8 cm. the pipe has an inside diameter of 8.5 cm. the annulus between the cylinder ad the pipe contains stationary oil. the oil has a specific gravity of 0.92 and a kinematic viscosity of 5.57 x 10-4 m2/s. most nearly, what is the force needed to move the cylinder along the pipe at a constant velocity of 1 m/s?
Answers: 3
question
Engineering, 04.07.2019 19:10
Aplate of dimensions 3 m x 3 m is placed 0.37 mm apart from a fixed plate. the plate requires a force of 2n to move at speed of 45 cm/s. evaluate the viscosity of the fluid in between the plates
Answers: 3
You know the right answer?
Tip: String. find(searchWord)In this challenge, you will be asked to find one string in the text of...
Questions
Questions on the website: 13722361