[Tutor] User defined exceptions

Dennis Lee Bieber wlfraed at ix.netcom.com
Fri Oct 15 11:51:18 EDT 2021


On Fri, 15 Oct 2021 12:43:04 +0100, Alan Gauld via Tutor <tutor at python.org>
declaimed the following:

>On 15/10/2021 08:03, Manprit Singh wrote:

>>     if score < 0 or score > 100:

>
>raise MarksError("Score must be between 0 and 100")
>

	.... Inclusive

	"between 0 and 100" can be interpreted as 1 to 99.


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/



More information about the Tutor mailing list