On Tue, Nov 2, 2010 at 3:34 PM, Adam Bark <adam.jt...@gmail.com> wrote:
> On 02/11/10 19:07, Glen Clark wrote: > >> sorry: >> >> NumItems = int(input("How many Items: ")) >> >> >> Entries = [] >> for In in range(0,NumItems): >> Entries.append("") >> >> >> >> for In in range(0,NumItems): >> Entries[In]=str(input("Enter name " + str(In+1) + ": ")) >> >> >> for In in range(0,NumItems): >> print(Entries[In]) >> >> confirmed = int(input("Are you happy with this? (y/n): ") >> >> if confirmed == "y": >> for In in range(0,NumItems): >> print(Entries[In] + ": " + str(In)) >> change = int(input("Which item would you like to change: ") >> Entries[change]=str(input("Please enter a nem name: ") >> else: >> #do nothing >> >> print(Entries) >> >> >> > Ok that's easier, you're missing a closing bracket at the end of the > > > confirmed = int(input("Are you happy with this? (y/n): ") > > line. > I think you might need at least a pass after else as well, although it > should be fine to leave it out altogether once you've added the ')'. > > HTH, > Adam. > > _______ > if confirmed == "y": for In in range(0,NumItems): print(Entries[In] + ": " + str(In)) change = int(input("Which item would you like to change: ") Entries[change]=str(input("Please enter a nem name: ") > else: > #do nothing > Actually, I caught two mismatched parens. In the line starting with 'change' and the following line. Fix those first > ________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Joel Goldstick
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor