How can I make a sentinel value NOT be initialized in a class/method - OOP?

Erik python at lucidity.plus.com
Fri Jan 13 18:32:51 EST 2017


Hi,

On 13/01/17 22:26, daviddschool at gmail.com wrote:
> The issue I am having is that when i enter the sentinel value of QUIT, it gets initialized as the name and printed out.  How can I get around this?

If I understand the question correctly (which looks like it's just a 
re-worded homework question (*)), you need to look at the 'if' statement:

https://docs.python.org/3/tutorial/controlflow.html#if-statements

E.

(*) If it is a homework question, you'd look better on the list to state 
it as such, and post some code that at least tries to answer the 
question before you're likely to get a useful response. However, as you 
have indicated a specific problem, I'll assume you have actually written 
some code.



More information about the Python-list mailing list