Very weak type system, beginner-friendly but finicky to work with, and has the simplicity for simple tasks. It's the language anyone can write in with a little experience, the language that's most portable for KOTHs. Many rules can be bent and still work.
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
# Formal verification doesn't "hack-proof" anything | |
The only reason the programs needed to be translated to "math language" is because "math language" is exact. Programming languages are exact too. | |
QED. If it really works then this is possible: | |
```bash | |
$ cat build.sh | |
checkhacks main.js | |
uglifyjs main.js > min.js |
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
© Licensor 2016. All Rights Reserved. |
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
package com.ppcg.stockexchange; | |
import com.ppcg.kothcomm.game.AbstractPlayer; | |
import com.ppcg.kothcomm.utils.Tools; | |
import java.util.List; | |
public class VincentKasuga extends Player { | |
int knownStock; | |
int knownPrice; |
Part four is coming soon!
And you can try the code samples online at Ideone. Paste the code in and click the dropdown at the bottom left of the text box. Select "Python 3". Click "Run".
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
# Today I'll tell you about FUNCTIONS. | |
# Often, we need to reuse code because we do similar operations and don't wanna repeat the code every single time | |
# because that means larger code (that's bad) and awkward and hard to understand code (for humans) | |
# You call (fancy word for execute) a function using function_name(paremeter1, paremeter2, paremeter3, ...). | |
# Functions can have anywhere from zero to virtually infinite paremeters | |
def countdown(start_number): | |
if start_number > 0: # only do a countdown if the start number is greater than zero | |
print(start_number) # print the starting number | |
countdown(start_number-1) # what's this? It's a functions that calls itself! |
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
# Today I'll tell you about FUNCTIONS. | |
# Often, we need to reuse code because we do similar operations and don't wanna repeat the code every single time | |
# that means larger code (read: less storage space!) and awkward and hard to understand code (for humans) | |
# You call (fancy word for execute) a function using function_name(paremeter1, paremeter2, paremeter3, ...). | |
# Functions can have anywhere from zero to virtually infinite paremeters | |
def countdown(start_number): | |
if start_number > 0: # only do a countdown if the start number is greater than zero | |
print(start_number) # print the starting number | |
countdown(start_number-1) # what's this? It's a functions that calls itself! |
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
# Today we will learn about if-elif-else clauses and getting input. | |
# The programming language we've been using all along is Python 3, by the way | |
# Here's the code: | |
favorite_number = int(input("What's your favorite number? ")) | |
if favorite_number > 900: | |
print("Woah, you like big numbers.") | |
elif favorite_number == 0: | |
print("Zero. The number of emptiness.") | |
elif favorite_number > 0 and favorite_number < 10: |
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
# This is a comment. The computer will ignores all comments. | |
# They are basically notes you put in code just to remind you (the human!) | |
# what the code does next time you read over it so we coders don't forget. | |
# In Python, anything after a "#" is considered a comment. | |
# We'll use comments to talk about the code that will be shown. | |
# And by the way, the computer ignores blank lines | |
wearing_pants = False # this is a variable assignment. |