lesson04

Hmmm I thought I removed the or on my last one. Break was covering the if statement I thought to avoid any infinite loops. Sorry about the lists and types browsed through other chapters of our book and other books to try to figure out ways to complete and/or attempt to correct assignments. 

Btw, last quiz I used the command line a few times to try to get some of the logic questions and put same answer as CLI and was marked wrong. I'll be sure to get a screen shot next time

Sent from my iPhone

> On Sep 23, 2014, at 6:12 PM, Chad Heuschober <notifications@github.com> wrote:
> 
> In task_05.py:
> 
> > +Practice create versus Matchups."""
> > +
> > +import data
> > +MATCHUPS = ("")
> > +ALLM = []
> > +C = 1
> > +
> > +for ROW_INDEX, ROW_NAME in enumerate(data.VERSUS):
> > +    for COLUMN_INDEX, COLUMN_NAME in enumerate(data.VERSUS):
> > +        if ROW_INDEX > COLUMN_INDEX or ROW_INDEX < COLUMN_INDEX:
> > +            MSG = "{0}, {1}, {2}\n"
> > +            ALLM.append(MSG.format(C, ROW_NAME, COLUMN_NAME).strip())
> > +            C += 1
> > +            MATCHUPS = tuple(ALLM)
> > +        else:
> > +            break
> Again, play attention to the assignment as written. You don't want to add that tuple or list at this stage in the course since we've not covered either in the text.
> 
> We've already discussed why you don't want the or here.
> 
> MSG construction is good but pay attention to the detail in the assignment instructions as there is no space between them. Instead of just appending them, then, you could just use simple string concat:
> 
> MATCHUPS = ""
> # looping
>             MATCHUPS += MSG
> Could you explain why you felt you needed that else: break statement at the bottom?
> 
> —
> Reply to this email directly or view it on GitHub.