[Tutor] if statement
Emile van Sebille
emile at fenx.com
Tue Nov 2 20:57:50 CET 2010
On 11/2/2010 12:07 PM Glen Clark said...
> 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): ")
The line above (which would appear to set confirmed to an int) doesn't
have matching parens, which causes an error to be trapped elsewhere.
Emile
More information about the Tutor
mailing list