From 6820ca60cd19b1148ac5eef495b0a172d0426f32 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 9 Nov 2022 20:26:45 +0000 Subject: - Added guest contributions by Eric Cheung. --- challenge-190/eric-cheung/python/ch-1.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 challenge-190/eric-cheung/python/ch-1.py (limited to 'challenge-190/eric-cheung/python/ch-1.py') diff --git a/challenge-190/eric-cheung/python/ch-1.py b/challenge-190/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..0f32352a2d --- /dev/null +++ b/challenge-190/eric-cheung/python/ch-1.py @@ -0,0 +1,15 @@ + +def IsApproCapital (strFuncInput): + + if strFuncInput.islower() or strFuncInput.isupper() or strFuncInput[0].isupper() and strFuncInput[1:].islower(): + return True + + return False + + +## strInput = "Perl" ## Example 1 +## strInput = "TPF" ## Example 2 +## strInput = "PyThon" ## Example 3 +strInput = "raku" ## Example 4 + +print ("1" if IsApproCapital(strInput) else "0") -- cgit