diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2023-12-06 10:47:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 10:47:13 +0000 |
| commit | 40df386111c052c9c5a9f2117b3ce7b519a690bc (patch) | |
| tree | 4c57e04c9e413cb0724601ac04f8a1759d537b13 /challenge-246/packy-anderson/python/ch-1.py | |
| parent | c456d18d80546e1d9071b3a9f7e899648c5a6665 (diff) | |
| parent | 3e582d97344601727f66530135ac13d122d13f29 (diff) | |
| download | perlweeklychallenge-club-40df386111c052c9c5a9f2117b3ce7b519a690bc.tar.gz perlweeklychallenge-club-40df386111c052c9c5a9f2117b3ce7b519a690bc.tar.bz2 perlweeklychallenge-club-40df386111c052c9c5a9f2117b3ce7b519a690bc.zip | |
Merge pull request #9206 from packy/master
Challenge 246 solutions by Packy Anderson
Diffstat (limited to 'challenge-246/packy-anderson/python/ch-1.py')
| -rwxr-xr-x | challenge-246/packy-anderson/python/ch-1.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-246/packy-anderson/python/ch-1.py b/challenge-246/packy-anderson/python/ch-1.py new file mode 100755 index 0000000000..035378a255 --- /dev/null +++ b/challenge-246/packy-anderson/python/ch-1.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +from random import sample + +def sixOutOfFourtyNine(): + return sorted(sample(range(1, 49), 6)) + +def solution(): + arr = sixOutOfFourtyNine() + print( "\n".join(map(str, arr)) ) + +print('Output') +solution() |
