Created
June 11, 2014 22:02
-
-
Save bholzer/d140695f455cdeff93b5 to your computer and use it in GitHub Desktop.
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
import sys | |
def main(): | |
Scanner = Scanner("info.dat") | |
Boolean = Scanner.readbool() | |
String = Scanner.readstring() | |
Number = Scanner.readint() #no need to wrap this in int() since readint will do that automatically | |
if Boolean: #Here, you don't need to do == "True" because the readbool function automatically converts things correctly | |
print('{s}\n"{s}"'.format(s=String)) | |
else: | |
print (2*Number) | |
return 0; | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment