Python Ideas

Python Ideas

This page gives you a variety of different ideas for programming problems. No solution is given you need to solve these problems for yourself!

 

1. Design a program to build a fruit machine simulator.

  • Allow the user to enter cash or credits. Credits should go down by 1 after every turn. Credits should go up by 100 every time there is a jackpot.
  • You need to find a way to display a random selection from 3 different items (cherry's, bell's or lemons etc).
  • You need to program python to award a jackpot everytime the 3 items all match.
  • Print an End of game message when credits are zero.

 

2. Design a program to build a reaction timing maths quiz.

Your program needs to be able to...

  • Allow the user to pick between addition, subtraction, multiplication and division.
  • Validate all data entered to check for incorrect data being entered and display error messages.
  • Show the user two random numbers and time their reaction time (how long it takes them to get the right answer).
  • Create a scoring system to work out firstly if they got the answer right and if, so how long it took.
  • Decide for yourself the number of questions you have in a round.
  • See if you can develop the game further to allow two players to play.

 

3. Design a program to run a parking meter.

  • Your program needs to allow the user to select how long they intend to stay in the car park e.g. 1 hour for £3 2 hours for £4 or £8 all day.
  • Your program needs to allow the user to enter cash into the meter.
  • When cash entered equals the length of time the user wishes to stay the program needs to print out a ticket. Your ticket shoulb be both displayed in python and also created as a new word document.
  • If cash entered is more than required your system needs to let the user know how much change they recieved. Your created ticket needs to show the length of time they chose, fee required, money entered and any change awarded.
  • How can security be increased in order to stop someone giving somebody else their ticket?

 

4. Design a code to simulate the National Lottery.

  • Your system should allow the user to decide if they want to have a lucky dip or pick there own numbers.
  • Your system should validate data entry to only allow integers between 1-60.
  • Your system should not allow the user to enter the same number twice.
  • A lucky dip should generate integers at random between 1-60 again with no repeats.
  • Your winning lottery numbers (drawn out of the system) should again be a non repeating series of numbers.
  • If the player gets 3 matching numbers they win £10, 4 numbers £50 etc.
  • The user is charged £2 a go.
  • Your system should keep track of winnings and money spend.
  • Your system should allow the user to select how many weeks they wish to play for and run a cycle for that many weeks.