Updated python 1 line slot machine

pull/160/head
ThatXliner 3 years ago committed by GitHub
parent 90fb2420ad
commit 1ea5cf7114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,7 +53,7 @@ print('\n'.join([''.join([('OhMyLove'[(x-y)%8]if((x*0.05)**2+(y*0.1)**2-1)**3-(x
python -c "while 1:import random;print(random.choice('|| __'), end='')"
# Simulate a slot machine
python -c "import random;p=lambda:random.choice('7♪♫♣♠♦♥◄☼☽');[print('|'.join([p(),p(),p()]),end='\r') for i in range(8**5)]"
python -c "import random,time;p=lambda x=0:random.choice('7♪♫♣♠♦♥◄☼☽');[print('|'.join([p(time.sleep(0.1)),p(),p()]),end='\r') for i in range(5*8)];time.sleep(1)"
# Guess number game
python -c "import random;n=random.randint(1,99);[(lambda a:print('Y' if a==n else 'H' if a>n else 'L'))(int(input())) for i in range(6)]"

Loading…
Cancel
Save