![]() |
インフォ | FAQ |
||
| 言語 | 環境 | 比較 |
![]() |
Index |
Java | ActionScript
| Lingo |
Python | Design
By Numbers
|
| Processing | Python | |
| int x = 70; //
Initialize x = 30; // Change value |
x = 70 #
Initialize x = 30 # Change value |
|
| float x = 70.0; x = 30.0; |
x = 70.0 x = 30.0 |
|
| int[] a = {5, 10, 11}; a[0] = 12; // Reassign |
a = (5, 10, 11) a[0] = 12 # Reassign |
|
| Processing | Python | |
| void loop() { // Statements } |
while 1: # Statements |
|
| for(int a=45; a<=55; a++) { // Statements } |
for a in range(45, 55): # Statements |
|
| if(c==1) { // Statements } |
if c == 1: # Statements |
|
| if(c!=1) { // Statements } |
if c != 1: # Statements |
|
| if(c < 1) { // Statements } |
if c < 1: # Statements |
|
| if(c >= 1) { // Statements } |
if c >= 1: # Statements |
|
| if((c >= 1) && (c < 20)) { // Statements } |
if c >= 1 and c < 20: # Statements |
|
|
if(c >= 20) { |
if c >= 20: # Statements elif x == 0: # Statements else: # Statements |
|
| Processing | Python | |
| // Comment | # Comment | |
| void doIt(int x) { // Statements } doIt(x); |
def doIt(x): # Statements doit(x) |
|
| int square(int x) { return x*x; } square(X); |
def square(x): return x*x square(x) |
|
![]() |
Processing >> Python by REAS, Walter Aprile |
![]() |
||
| © 2002, 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea | ||
| Processing is an open project initiated by Ben Fry and Casey Reas |