You are currently browsing the archives for the programs category


Example worksheet with the results

Here’s the second program for doing simulations of the game of life:
http://ideone.com/6NXB8

This version is capable of executing multiple runs, and averaging the results. We will go through the details of the changes, and then show how we can visualize the results in Excel. An example worksheet is shown below (download this and view it). A similar thing can be done in OpenOffice.
http://stars.martinpelikan.net/wp-content/uploads/2012/06/example1.xlsx

http://www.math.cornell.edu/~lipa/mec/lesson6.html

Assignment 5

This assignment is due by the next learning session on Monday, June 25, 2012. Please complete the programs on ideone.com, and send me the links to your programs via email at martin@martinpelikan.net.

Program A10:
Solve problem 7 from projecteuler.net. Submit the solution directly on the projeuler.net site so that you get it verified, and send me the link to the program you used to compute the solution (just like for previous problems).

Program A11:
Solve problem 9 from projecteuler.net. Submit the solution directly on the projeuler.net site so that you get it verified, and send me the link to the program you used to compute the solution (just like for previous problems).

Code from learning session 6

Here’s a link to the code from learning session 6:

http://ideone.com/pelikan/session_6

Code from learning session 5

Here’re the codes from today’s learning session:

http://ideone.com/pelikan/session_5

Code from learning session 4

Code from today’s learning session can be found here:

http://ideone.com/pelikan/session_4

Code from learning session 3

Here’s the code related to what we did in this session:
http://ideone.com/oOW95
http://ideone.com/23FeL
http://ideone.com/KEveU
http://ideone.com/92Fzk
http://ideone.com/syk40
http://ideone.com/BpZqr
http://ideone.com/1Mfeh
http://ideone.com/ubVxy
http://ideone.com/oi04l

I forgot to get to the greatest common divisor, which I still wanted to do, but we can deal with that in the next class.

Code from learning session 2

The code I’ve done real-time during the session can be found on the following link:

http://ideone.com/pelikan/session_2

In addition, these are the pieces of code I prepared prior to the session:
http://ideone.com/Eoilq
http://ideone.com/orQlP
http://ideone.com/WStdy
http://ideone.com/IC1hX
http://ideone.com/kIUQr

I will add more code relevant to the use of functions after the next session.

Code from learning session 1

Here’re the links to the programs we worked on during the learning session 1:

http://ideone.com/MbXAy

http://ideone.com/vjSga
http://ideone.com/QQU6O
http://ideone.com/doC0s
http://ideone.com/5Ea86
http://ideone.com/MbXAy

Additional links to similar codes that I prepared earlier (I already posted about these):
http://ideone.com/5Z7o5
http://ideone.com/CL2TD
http://ideone.com/6GvFA
http://ideone.com/AvtTw
http://ideone.com/JoRau

Variables, arithmetic operations and conditions

The following set of programs provides examples for use of variables, arithmetic operations, and conditions. We will look at more examples when we meet:

Program 2: Arithmetic operations, variables
http://ideone.com/5Z7o5

Programs 3-6: Conditions
http://ideone.com/CL2TD
http://ideone.com/6GvFA
http://ideone.com/AvtTw
http://ideone.com/Eoilq

Additional materials for these topics can be found in the books I suggested or online. As we go through more complex topics, we will of course have to revisit these basics and get better at them.

Program 1: I’m alive!

I’ve already put in a few programs for us to start with, here’s the first one. Don’t worry about the post until we start with the program on June 11, 2012 (but of course feel free to look at it already if you want):

http://ideone.com/JoRau

When you click on the link, you should be able to see the first, simple program, similar to the classical “Hello World!” program. The only thing the program does is print out a line with “I’m alive!” on the screen. The output is shown in the page as well, and you can edit and play with the program there yourself.