Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-04 Thread Alan Gauld
Hi John, The code is looking better, some minor points below: > import sys > maxmark = [] > counter = 0 > > while 1: >try: >mark = int(raw_input("Enter the Values for the Array: ")) >maxmark.append(mark) >print maxmark >except ValueError: >#print "From H

Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread John Joseph
Hi All I was able to exit the while loop , using sys module also I was able to find the maximum no of marks entered , I am adding my code , for comments and suggestions Thanks for the support Joseph John *

Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread Alan Gauld
> entries for the list , But if I press Enter it should > exit the while loop without giving errors ,I have > problem in making it work , right now if I press enter > to exit , the program terminates showing error Thats because you can't convert an empty string to an int. If you defer the conv

[Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread Adam
Woops, forgot to reply-all.-- Forwarded message --From: Adam <[EMAIL PROTECTED]>Date: 03-Jan-2006 15:48 Subject: Re: [Tutor] How to make to exit the loop, while typing EnterTo: John Joseph <[EMAIL PROTECTED]> array = []m = 0print "Enter  to exit"m = int(raw_input("Enter the  Values

Re: [Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread Danny Yoo
> I am trying to write a program in which it ask for entries for the list > , But if I press Enter it should exit the while loop without giving > errors Hi John, Do you have ideas why it's getting an error? Can you point at the part of the program that's receiving the "Enter"? As a related qu

[Tutor] How to make to exit the loop, while typing Enter

2006-01-03 Thread John Joseph
Hi I am trying to write a program in which it ask for entries for the list , But if I press Enter it should exit the while loop without giving errors ,I have problem in making it work , right now if I press enter to exit , the program terminates showing error I am added my script wh