Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57bccee

Browse files
Adding return boolean and other statements
1 parent c7182c2 commit 57bccee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎Problem Solving Scripts/CPF_Checker.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,14 @@ def validateCPF(userCPF):
149149
mergeRes = str(userCPF[:9]) + str(restSum) + str(restSumSec)
150150
logThis(f"Merged result: {mergeRes}")
151151

152-
return mergeRes
152+
if mergeRes == userCPF:
153+
logThis("CPF is valid.")
154+
validCPF = True
155+
return validCPF
156+
else:
157+
logThis("CPF is NOT valid.")
158+
validCPF = False
159+
return validCPF
153160

154161

155162
if __name__ == "__main__":

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /