Vai al contenuto

Challenge 2016-04

Text Challenge

Write a program that records your typing speed (words per minute).
Consider using a multi-line textbox for the user to type into.

Maths Challenge

Try to write the fastest code to calculate the sum of all prime factors of the first 1000 numbers.
For example the first 10 numbers (1 has no prime factors) have the following prime factors (2, 3, 2+2, 5, 2+3, 7, 2+2+2, 3+3, 2+5) and their sum is 45.

Graphics Challenge

  1. Write subroutines to convert between RGB colour values and HSL (to and from).
    RGB are the Red, Green and Blue components, while HSL are the Hue, Lightness and Saturation.
    Using HSL to set colours can give nice effects.
    Start here to learn about HSL and maybe search for some online algorithms to help writing the conversioncode.
  2. Write a program using the HSL conversion to change the Hue (colour) of an image by changing each pixel.  For performance reasons (it will be slow), try using fairly small images, say 100 by 100 pixels (that is still 10000 pixels to change).

Game Challenge

Write a program to play GO.
Some AI would be great to play against the computer.
Read about AlphaGo.

Community Suggestions

  1. By jherch77
    Create a fully functional calculator (8-digit, basic calculator, not scientific) but do all the calculations by hand… meaning that if the user wants 356 * 8…the program should multiply 8*6 then 8*5+4 then 8*3+4.
    Just like you would do it if you had to multiply with pencil and paper.
    This would require addition, subtraction, multiplication and division and as an added challenge, negative numbers.
  2. By Yvan Leduc
    a program to calculate how much power (watt) is necessary to climb an elevation of 5% grade.
  3. By Yvan Leduc
    a program that could quantify the number of Watts uses the writing, storage on different servers, and the delivery to the addresses of a simple e-mail?
  4. By Yvan Leduc
    A knight’s tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once.
    If the knight ends on a square that is one knight’s move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed, otherwise it is open.


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.