New to coding? Get started here!
Check out these languages:
Java | Python | Javascript | |
Variables | int x=5; | x=5 | var x=5; |
Functions | void myFunction() | def myFuction(): | function myFunction() |
Code Blocks | {} | indents | {} |
Not/Or/And | !/||/&& | not/or/and | !/||/&& |
Boolean | true/false or True/False | True/False or 0/not 0 | true/false |
Comments | // | # | // |
While Loops | while(x!=3) | while x!=3: | while (x!=3) |
For Loops | for(int i=0; i<10; i++) | for i in range(10): | for(i=0; i<10; i++) |
Semicolons | Needed at the end of a statement | Not needed at the end of a statement | Needed at the end of a statement |
HTML:
<!Doctype html> -- lets the computer know this is an html file < html > < head > < title > title < /title > -- the / means this is an ending tag-- every tag needs an ending tag! << /head > < body > This text is in the body! <h1> This text is a header.</h1> <p> This is a paragraph. </p> < /body > < /html > |
CSS:
body { background-color: white; color: blue; } h1 { color: red; text-align: center; } |