Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random; print('GUESS THE NUMBER\n\n'); play_again=lambda step=0, number=-1, uinput='', tries=0:(None, (print('I am thinking of a number between 1 and 100, can you guess it?'), play_again(1, random.randrange(100)+1, input('>>> '), tries)) if step==0 else ((print('Your number is too high.'), play_again(step, number, input('>>> '), tries+1)) if int(uinput) > number else ((print('Your number is too low.'), play_again(step, number, input('>>> '), tries+1)) if int(uinput) < number else ((print('YOU GOT IT!!!'), print('Tries it took: ' + str(tries+1)), print('\nif you want to play again: play_again()')))) if uinput.isdigit() else (print('What.'), play_again(step, number, input('>>> '), tries))))[0];play_again()
Add Comment
Please, Sign In to add comment