Sunday, 11 August 2013

Python Syntax Error, 'break' is outside the loop

Python Syntax Error, 'break' is outside the loop

try:
ip = float(input("Enter a number to find it's absolute value (press
'e' to exit):"))
if ip == 'e':
break
Python is saying that break is outside of the loop. Does anyone have any
ideas on how to fix this? Thanks in advance.

No comments:

Post a Comment