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 Here to Where
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
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
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 Enterto exitm = int(raw_input(Enter theValues forThe
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
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