subject

Question 1 (already finished) Extract: "Data" From: "Introduction to Data Science" def question1(text): return (text[16:20], slice(16,20,1)) Notes and hints: 'extract' means return the substring that is to be 'extracted' (i. e. removed) from the 'From' text. if you want to debug your answers, just do the following (in main. py) import lesson as ans result = ans. question1("Introduction to Data Science") print(result[0] == 'Data') # looking for True you can also test each part of your expect = "Data" word = "Introduction to Data Science" s1 = slice(16,20,None) value = word[s1] if (value != expect): print("Bad Slice", expect, value) value = word[16:20] if (value != expect): print("Bad Index", expect, value) In each of your answers, you should ONLY use the slice function as part of the final return and you must use the parameter text in the return statement. do some answer(text): idx = some calculation() return (text[idx:20], slice(idx,20,1)) Bonus: ideally, you should solve each of these without any hardcoded numbers other than the step amount: Extract: "Data" From: "Introduction to Data Science" def question1(text): word = 'Data' wl = len(word) idx = text. find(word) return (text[idx:idx+wl], slice(idx, idx+wl, 1)) Question 2: Extract: "ar" From: "Orange" def question2(text): return (

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Determine which of the four levels of measurement (nominal, ordinal, interval, ratio) is most appropriate for the data below. internet speed levels of "fast comma " "medium comma " and "slow" choose the correct answer below. a. the ordinal level of measurement is most appropriate because the data can be ordered comma but differences left parenthesis obtained by subtraction right parenthesis cannot be found or are meaningless. nothing nothing nothing nothing nothing b. the interval level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is no natural starting point. c. the nominal level of measurement is most appropriate because the data cannot be ordered. nothing d. the ratio level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is a natural starting point.
Answers: 2
question
Computers and Technology, 22.06.2019 00:00
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
You know the right answer?
Question 1 (already finished) Extract: "Data" From: "Introduction to Data Science" def question1(tex...
Questions
question
Biology, 20.08.2019 17:00
question
Mathematics, 20.08.2019 17:00
Questions on the website: 13722361