Home > IB Computer Science 2018 > Printing the numbers from 0 to 99

Printing the numbers from 0 to 99

Students often get hung up on slight syntax differences, as if knowing how to program is the same as knowing a language’s syntax. It isn’t. Look at these examples and check you understand that they do the same thing. It is the logic of your programs that is important, not the brackets and semi-colons.

IB Computer Science pseudocode

loop J from 0 to 99
  output J
end loop

Python

for j in range(0,100):
  print(j)

Java

for (int j = 1; j < 100; j++) {
  System.out.println(j);
}

 

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s