Vai al contenuto

Challenge 2017-07

Text Challenges

  1. Write a program reverse all the characters in a sentence (“hello world” -> “dlrow olleh”)
  2. Write a program to reverse the word order in a sentence (“hello world” -> “world hello”)
  3. Write a program to swap pairs of characters in a sentence (“hello world” -> “ehll oowlrd”)
  4. Write a program to capitalise every word in a sentence (“hello world” -> “Hello World”)

Maths Challenges

  1. Write a program to calculate the sum of the first 10 whole numbers (1+2+3+…+9+10)
  2. Write a program to calculate the sum of the first 10 even numbers (2+4+…+18+20)
  3. Write a program to calculate the sum of the first 10 odd numbers (1+3+…+17+19)
  4. Write a program to calculate the sum of the first 10 numbers that are a divisible by 3 (3+6+…+27+30)
  5. Write a program to calculate the sum of the first 10 numbers squared (1+4+…+81+100)

Graphics Challenges

  1. Draw a picture of your pet (or animal you would like to be your pet)
  2. Draw a picture with that animates from day to night, perhaps a moving sun and moon, maybe stars gradually appearing

Interface Challenge

  1. Write a GraphicsWIndow interface using the Controls and Shapes commands with events to get the user to enter 5 numbers and get the program to calculate their sum, average, minimum and maximum values when buttons for these are pressed
  2. Validate that all data is correctly entered (e.g. all data are numbers and present)

Game Challenge

  1. Write a simple platform game, where your player has to move from left to right and jump over an obstacle or gap
  2. Extend as far as you can to include other features like scrolling with player, duck below objects, jump to get coins, avoid enemies etc

Physics Challenge

  • Write a program to simulate an internal combustion engine, valves openning, piston moving and turning a crank shaft

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.