Created
February 20, 2018 19:10
-
-
Save maxsnew/fa0e9f32682f80e514b7a09b673704d1 to your computer and use it in GitHub Desktop.
When should the type error happen?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_upper(s : str): | |
up_s = s.upper() | |
def printer(n : int): | |
acc = "" | |
for i in range(0,n): | |
acc += up_s | |
return acc | |
return printer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_upper(s : str): | |
def printer(n : int): | |
up_s = s.upper() | |
acc = "" | |
for i in range(0,n): | |
acc += up_s | |
return acc | |
return printer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment