Question: Please explain in simple steps, the process of how to get the answer. Thank you ----------------------------------------------------------- m2Date = '2017-03-27' freq = -1 position = 0

Please explain in simple steps, the process of how to get the answer. Thank you

-----------------------------------------------------------

m2Date = '2017-03-27' freq = -1 position = 0 while freq != 1: x = m2Date[position] freq = m2Date.count(x) position = int(freq) print(position)

-----------------------------------------------------------

When i try this one out if i but the same letter in sound it's still false?

def vehicleSound(vehicle, sound): for letter in vehicle: if letter not in sound: return False return True print(vehicleSound('car', 'beep'))

-----------------------------------------------------------

food_issues = [['lactose', 'gluten'], ['sugar', 'fat', 'salt'], 'fiber'] print(food_issues[1][1][1])

-----------------------------------------------------------

def returnVal(d, x): if x in d: return 'key' elif x in d.values(): return 'value' else: for v in d.values(): if x in v: return v web = {'secure':['https'], 'protocols':['ftp', 'tcp/ip'], 'markup':'html5'} print(returnVal(web, 'm'))

-----------------------------------------------------------

def characterAnalysis(s): d = {} for char in s: if char not in d: d[char] = 1 else: d[char] *= -1 return len(d) print(characterAnalysis('bib'))

-----------------------------------------------------------

def aSym(text): wordList = text.split() image = [] for i in range(len(wordList)): if wordList[i] == wordList[-i-1]: image.append(i) return image s = 'all for one and one for all' print(aSym(s))

-----------------------------------------------------------

bools = [True, 0>-1, not not True, 2%2 == 0, True and False] index = 0 while bools[index]: index += 1 print(index)

-----------------------------------------------------------

for i in range(2): for j in range(1): print(i, j, end = " ")

-----------------------------------------------------------

fats = "You broke my heart when you said we'll part" def makeDict(t): wordList = t.split() d = {} for word in wordList: initial = word[0] if initial not in d: d[initial] = [word] else: d[initial].append(word) return d print(len(makeDict(fats)))

-----------------------------------------------------------

For this question assume that a file edgar.txt exists and has the following content The affair is so simple and yet baffles us altogether

def lengthCount(inFile, num): inF = open(inFile) different = 0 content = inF.read() words = content.split() for word in words: if len(word) != num: different += 1 inF.close() return different print(lengthCount('edgar.txt', 3))

------------------------------------------------------

fred = 'power concedes nothing without a demand' freq = {} for thing in fred.split(): freq[thing] = fred.count(thing) print(len(freq))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!