Created
April 28, 2018 17:23
-
-
Save classmember/4026f6b6923a32a75a45d746b0f4ce51 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/python | |
def main(): | |
''' | |
This is the Python equivalent to the following C code: | |
int n; | |
printf("Enter a Number"); | |
scanf("&d",n); | |
if(n==1) | |
printf("true"); | |
else | |
printf("false"); | |
''' | |
n = raw_input("Enter a Number:\n") | |
if int(n) == 1: | |
print('true') | |
else: | |
print('false') | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment