Skip to content

Instantly share code, notes, and snippets.

@classmember
Created April 28, 2018 17:23
Show Gist options
  • Save classmember/4026f6b6923a32a75a45d746b0f4ce51 to your computer and use it in GitHub Desktop.
Save classmember/4026f6b6923a32a75a45d746b0f4ce51 to your computer and use it in GitHub Desktop.
#!/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