Question: One of the below programs that when called like this (with the underscore representing a digit from 1 to 4) generates this output: >>> mixem_(we
One of the below programs that when called like this (with the underscore representing a digit from 1 to 4) generates this output:
>>> mixem_("we hold these truths")
'w.e. .h.o.l.d. .t.h.ese truths'
Which one?
![• def mixem1(astring): mix = for index in range (0,len(astring), 2): mix = mix + astring[index] mix = mix +](https://dsd5zvtm8ll6.cloudfront.net/si.question.images/images/question_images/1606/2/8/7/2445fbdff8c8bf681606287243329.jpg)
def mixem1(astring): mix = for index in range (0,len(astring), 2): mix = mix + astring[index] mix = mix + "-" for index in range (len(astring)/2,len (astring)): mix = mix + astring[index] return mix def mixem2 (astring): mix = "" for index in range (0,len(astring)/2): mix = mix + astring[index]+"." for index in range (len(astring)/2,len(astring)): mix = mix + astring[index] return mix def mixem3(astring): mix = "" for index in range (0,len(astring)/2,2): mix = mix + astring[index] mix = mix + "-" for index in range (1,len(astring),2): mix = mix + astring[index] return mix def mixem4 (astring): mix = for index in range (len(astring)/2,0,-1): mix = astring[index]+mix + astring[index] return mix
Step by Step Solution
3.42 Rating (161 Votes )
There are 3 Steps involved in it
mixemwe hold the... View full answer
Get step-by-step solutions from verified subject matter experts
