[Tutor] 2 Very basic queries

Dave Angel davea at davea.name
Wed Mar 26 03:23:20 CET 2014


 Saad Bashir <bashir.saad at gmail.com> Wrote in message:


>>> ph = float(input('Enter the pH level: '))
Enter the pH level: 8.5
>>> if ph < 7.0:
...       print(ph, "is acidic.")
...    elif ph > 7.0:
...     print(ph, "is basic.")

"SyntaxError: : unindent does not match any outer indentation level.
............................

Welcome. 


We are seeing 3 extra dots before the continuation lines,
 probably because you mistakenly posted in html. Please post in
 text mode, so we all see the same thing, and so it matches what
 you pasted in.

As for your query,  what matters is the number of spaces you type
 before each line.  Don't bother trying to make the columns line
 up visually at the interactive prompt.  Same number f spaces for
 the if as for the elif, in this case zero.

-- 
DaveA



More information about the Tutor mailing list