LINUX LITE 7.4 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Project - UK & EU Lottery killas / Open Source donation builders
#13
Hello,
using the second version of the UK Lotto above I have redone the EuroMillions Python script.

[Image: eunext.png]

EuroMillions new version with less typing, and improved comment lines, running on Linux Lite in Terminal and showing code in Gedit.
I save this to a Leafpad document in Home folder and named this eunext.py


Here is the code


Code:
# imports random function
import random

# labelling for lotto number output
print ("Your EuroMillions numbers are - ")

# Picks 5 random numbers between 1 and 50
# range goes to 51 so that 50 is inclusive, 51 is not inclusive
# .sample does not duplicate numbers picked
# Outputs these 5 results in a list
print(random.sample(range(1, 51),5))

print ("Your Lucky Stars are - ")

print(random.sample(range(1, 13),2))

# interactivity - prints options
print ("You have Options - " "\nDonate a percentage of any wins to your favorite project" "\nDonate the stake instead to your favorite project")

To run this open terminal by holding down Ctrl and Alt keys and pressing t (Ctrl+Alt+t)
Then copy/paste or type

Code:
python eunext.py

I hope you enjoyed reading this.
Reply


Messages In This Thread
Re: Project - UK & EU Lottery killas / Open Source donation builders - by bitsnpcs - 05-19-2018, 12:56 PM
Demo of UK Lotto killa v 1.0 - by bitsnpcs - 05-28-2018, 07:35 PM
Demo of UK Lotto killa v 1.0 - by bitsnpcs - 05-29-2018, 08:55 AM
UK Lotto v1.01 - Demo2 - by bitsnpcs - 05-30-2018, 02:42 PM
UK Lotto final - Demo 3 - by bitsnpcs - 05-31-2018, 12:53 AM
EuroMillions Killa - Final - Demo - by bitsnpcs - 06-03-2018, 08:16 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)