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, 04.07.2019 18:10
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 18:10
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
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
question
Spanish, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
English, 18.09.2020 05:01
question
Biology, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
History, 18.09.2020 05:01
question
History, 18.09.2020 05:01
question
World Languages, 18.09.2020 05:01
question
History, 18.09.2020 05:01
question
English, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
question
Mathematics, 18.09.2020 05:01
Questions on the website: 13722362