Giter VIP home page Giter VIP logo

python-lucky-dip-lotto's Introduction

python-lucky-dip-lotto

Simulation of a continuous weekly lucky dip lottery
https://github.com/janet-dev/python-lucky-dip-lotto

Created using PyCharm 2020.3.3 (Community Edition)

Program simulates a continuous weekly lucky dip lottery. [UK lottery uses numbers 0-59] Each play represents one ticket bought per week.

The program has a list of seven numbers that represent a lottery ticket. It generates two sets of seven random numbers on each run:

  • the official draw ticket
  • your ticket

After comparing the two sets of numbers for that week, the program outputs a prize based on the number of matches:
● £20 for three matching numbers
● £40 for four matching numbers
● £100 for five matching numbers
● £10000 for six matching numbers
● £1,000,000 for seven matching numbers

Program then asks (y/n), if you wish to play again for another week. This is similar to an continuous online Lotto Entry by Direct Debit; to stop playing enter anything other than 'y'.

Each ticket costs £2 and running total for how much you spent over the simulated weeks, against how much you have won.

https://www.begambleaware.org/

Comments from a reviewer - thank you Rabia

Looks great JanetD. Very well done. Great comments and can follow the logic of your code well. I especially like the bit which warns the user about the times they have played and the money they have spent. Just the tiniest change I would suggest is display that message not only on if play != 'y': but by checking if the player has not won anything say after x amount of goes so they don't carry on playing. Also on line 58, Instead of 'Go to', I would just say 'Run the function', because that's what Python is actually doing. Have a great rest of the weekend. P.S I didn't win anything after 7 goes

python-lucky-dip-lotto's People

Contributors

janet-dev avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.