Noah
asked on
Content of the Tuple before Loops were executed
ASKER
@slightwv (䄆 Netminder) Thank you for your reply! But I don't think that's right.. For the answers, 4 and 7 are already in the right position. As seen in the screenshot, it says "the first two have already been filled in for you". I have to rearrange 1, 8, 6, 5, 3, 9, 2, 0.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Ohh! I see now. So that's what you meant.. I managed to get the right answer. It was 4,7,8,1,0,3,6,2,9,5.
There is a 5 and 8 in the results from the loops so they have to be in myTuple, right?
As far as solving this:
First loop:
Start with the first item (zero based): 4
Move over two ( i = i + 2) and print the next: 8
Move over two more and print: 0
and so on for the next two...
Second loop:
Start with the second item in myTuple: 7
Move over two and print: 1
and so on