Vai al contenuto

Challenge 2012-12

Text Challenge 1

Write a program to format a list of words so they are displayed in 5 vertical columns, with each column having the same indentation.

Text Challenge 2

Write a program to reverse all the words in a sentence,
For example “this is my sentence” would be “sentence my is this”

Physics Challenge

Model the radioactive decay of some atoms.
They should decay into 2 parts with an average time of say 10 seconds.
The life of the atom before decay should be random with an average (half-life) of 10 seconds.

If you fancy making the challenge harder, then create a graphics visualization of the decaying atoms or read up about radioactive decay and try to use the decay formulae based on a half-life.  See Wikipedia.

Community suggestions

  1. By Nonki – Draw a Christmas tree – how about with flashing lights.
  2. By Nonki – Calculate happy numbers below 1000.  See here for details.
  3. By Zock77 – Write a program to calculate a random number without using Math.GetRandomNumber.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.